akdess / BAFExtract

5 stars 5 forks source link

Could not find test/1_allele_counts.bin.gz #8

Open UmairSeemab opened 4 years ago

UmairSeemab commented 4 years ago

Hi there. I am trying to generate BAF files using test data and encountering the following error: Could not find test/1_allele_counts.bin.gz. The command I used is mkdir test; samtools view SRR1295366.sorted.bam | ~/Tools/BAFExtract-master/bin/BAFExtract -generate_compressed_pileup_per_SAM stdin ./BAFExtract_input-files/hg38.list test 50 0; ~/Tools/BAFExtract-master/bin/BAFExtract -get_SNVs_per_pileup ./BAFExtract_input-files/hg38.list test ./BAFExtract_input-files/hg38/ 20 4 0.1 test.snp

and the output is

Generating pileup from SAM file with min mapp qual 50, min base qual 0 Dumping the pileups per SAM file stdin Allocating pileup memory. Killed Calling SNVs with minimum 20 total and 4 alternate read coverage and 0.100 min alternate frequency. Procesing 1 Could not find test/1_allele_counts.bin.gz.

jgarces02 commented 2 years ago

Any idea about what's happening? Thanks

jgarces02 commented 2 years ago

It's a memory problem...

...
Allocating pileup memory.
Killed
...

... that makes intermediate files aren't correctly generated, and error.

jgarces02 commented 2 years ago

Try to sort (by coordinates) your BAM file previously running BAFExtract and run each step separately:

#>1
samtools sort yourBAM.bam | samtools view - > yourBAM.sorted.bam
#>2
BAFExtract -generate_compressed_pileup_per_SAM yourBAM.sorted.bam hg38list test 50 0
#>3
BAFExtract -get_SNVs_per_pileup hg38list test hg38/ 20 4 0.1 yourBAM.sorted.bam.baf