lh3 / fermi

A WGS de novo assembler based on the FMD-index for large genomes
75 stars 16 forks source link

Option -n non-existent in samtools bam2fq -n #3

Closed aldeluis closed 12 years ago

aldeluis commented 12 years ago

Hi, I'm having problems running this new version because run-fermi.pl generates a make file that calls to samtools bam2fq -n file.bam.

Seems that there's no option -n in "samtools bam2fq".

Your work is great, thank you!

lh3 commented 12 years ago

What is your command line? Are you feeding a BAM as input?

aldeluis commented 12 years ago

Yes, I'm feeding BAM as input.

run-fermi.pl -t24 ../unmapped.bam > fmdef.mak make -f ./fmdef.mak -j24 > log 2>&1

(samtools bam2fq -n ../unmapped.bam) | fermi ropebwt -a bcr -v3 -btNf fmdef.raw.tmp - > fmdef.raw.fmd 2> fmdef.raw.fmd.log open: No such file or directory

After editing fmdef.mak, deleting the option -n in samtools bam2fq -n, all runs flawlessly.

lh3 commented 12 years ago

It is not recommended to use BAM as input, unless you know what samtools/fermi is doing. If you want to use BAM anyway, you need "-n" at least for some versions of fermi (not sure now). The option is available in the latest samtools.

Also, your BAM must be name sorted and both ends in each pair are present; otherwise you can only get contigs without using read pairs.

aldeluis commented 12 years ago

Right, then I need the latest samtools.

I'm trying samtools 0.1.18-dev (r982:313) from your sourceforge svn repository (is this the primary source?). Seems that hasn't the -n option.

samtools bam2fq -n unmapped.bam | head -10 open: No such file or directory

samtools bam2fq unmapped.bam | head -10 @HWUSI-EAS1829:0:1:1:1301:945:1 NACGCCAACAGGCTCTTTCTGCTCTATGAATGAATCCGCCTTTTTTGCCGGACAAATACACTCCATTGTAACTGTCAGGTTTCTCTAGAGGGGGGTGAGNN + ##################################################################################################### @HWUSI-EAS1829:0:1:61:12257:16153:1 GGAAGAACCCTTCTGAGAAAGGGCCCAAACTAGCTGCCTTCCTGCAACGTGGCTTGCTGCCCGCTTCTAGTAAGTCGGTGACGAATCTGGCCCACAGCGGG + ##################################################################################################### @HWUSI-EAS1829:0:1:1:1564:937:1 NTCCAGCATTTCTACCTGTTGGTCTCAGATGTCTTGAAGCTGTTTCTGCTCAGGTTGAGGAACCACTGGAAGCGCTTGAACTCACTGTGTATGTCCCNNNN

lh3 commented 12 years ago

Samtools has been moved to samtools/samtools for a year or so.

aldeluis commented 12 years ago

Oh, sorry, I didn't realize.

Now all is working with version 0.1.18-r580

Thank you!