Question: Converting .sam to .bam with samtools and I get a new error with every repeated command
gravatar for ryanzapotocny
2.1 years ago by
ryanzapotocny0 wrote:

I am using the samtools view -b -S -o command and I seem to get a new error every time I run the command.

I will get [sam_read1] reference 'AMELIA:269' is recognized as '*'. [main_samview] truncated file.


Parse error at line 5177839: sequence and quality are inconsistent Aborted (core dumped) this line changes everytime

Also [sam_read1] reference 'AMELIA:269:C1EUFACXX:2:1101:12' is recognized as '*'. [main_samview] truncated file.'

The sam input file was created with the bwa sampe command

snp alignment assembly • 781 views
ADD COMMENTlink modified 2.1 years ago by Petr Ponomarenko2.6k • written 2.1 years ago by ryanzapotocny0

you sure, you used the right reference when generating sam file? Most likely your sam header is messed up, also:

Error In Converting Sam To Bam By Samtools

it could be that your alignment was not finished prior to generating sam file maybe it's a good idea to wrap your mapping in a shell script, and echo when each stage was finished

ADD REPLYlink written 2.1 years ago by stolarek.ir580
gravatar for Petr Ponomarenko
2.1 years ago by
United States / Los Angeles /
Petr Ponomarenko2.6k wrote:

I had what appears to be a similar problem when using nohup and some other ways to redirect the bwa output and its' progress information that it prints out a couple of years ago. The reason is that it bwa is not interacting properly with standard methods and for a strange reason sometimes prints its progress information into the output alignment file making the later corrupted.

Could you please grep the sam output file with -A 2 -B2 option for "AMELIA", "sam_read1", "main_samview" and other phrases you get in the error massages and print out grep results here?

If you have same problems as I had than the first thing to test is to start your bwa as recommended in the documentation and then use control+Z and bg and disown. See if the result is going to be corrupted still.

Thank you.

ADD COMMENTlink written 2.1 years ago by Petr Ponomarenko2.6k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1173 users visited in the last hour