guyduche / Blast2Bam

Blast2Bam uses the XML results of Blastn, the reference and the fastQ or fasta file(s) to output a SAM file.
MIT License
46 stars 10 forks source link

Error Printing Sam header #4

Closed Kan10001 closed 7 years ago

Kan10001 commented 8 years ago

I am trying to convert blastn output to bam. However, I am getting "error printing sam header". I would very much appreciate some help.

guyduche commented 8 years ago

Hello, This particular error can come from two things: Either there is a problem with the reference file (fasta file) or, if you have one, with the read group you assigned. About the read group, it is imperative that it begins by @RG\tID:name\t... You can put whatever you want after the last \t. Of note, you shouldn't put the read group between quotes, the program already transforms the \t into tabulations for bam output.

lirr-lichen commented 4 years ago

Hello, I meet this problem too. There are my files:https://github.com/lirr-lichen/1_testdata.git The command line I use: blast2bam mCNS182020101601A1D1L1.blast.xml Human_alphaherpesvirus_1.dict mCNS182020101601A1D1L1.fq > out I can't finger out this problem. Could you help me ? Thank you.

guyduche commented 4 years ago

Hello lirr-lichen, The issue is with your reference file. Blast2bam needs the original reference file and not the dict version. You should try the following command line: blast2bam mCNS182020101601A1D1L1.blast.xml Human_alphaherpesvirus_1.fa mCNS182020101601A1D1L1.fq > out.sam It should work.

lirr-lichen commented 4 years ago

Thanks for your help,it resolved my problem.