freebayes segmentation fault I have a draft, Illumina-based, genome and bunch of reseq samples. I generated bam files using bowtie2 and marked duplicates using picard.
Now, when I tried to call SNPs using freebayes, I got cryptic Segmentation fault (core dumped) even when I tried to run it in verbose debugging mode (-dd). Do you have an idea where might be a problem?
freebayes -f data/Afus1/genome.fa -b reseq1.sorted.rmdup.bam reseq2.sorted.rmdup.bam -dd                                                                                                                    
  loading fasta reference data/Afus1/genome.fa                                                                                              
                                                                         Opening 2 BAM format alignment input files                         
                                                                                                                                            
     done                                                                                                                                   
Number of ref seqs: 821466                                                                                                                  
Number of target regions: 0                                                                                                                 
no sample list file given, reading sample names from bam file                                                                               
found 2 samples in BAM file                                                                                                                 
Segmentation fault (core dumped)   
```
Oh you silly sausage!
This obviously means that you are running out of stack memory. Apparently...

freebayes is creating a single string containing the entire vcf header, which gets quite big when the reference has a lot of contigs with long names, causing stack space depletion.

Try increasing the maximum stack size (in this example to 128M) and running your command again.
ulimit -S -s 131072