Yue - The samtools error message "sequence and quality are inconsistent" frequently indicates that the string length differs between strings in columns 10 and 11 of SAM format. That appears to be the case here. I don't understand the purpose of duplicating each line using 'paste', but the consequence is that the following read name gets appended to the end of some base call quality strings, increasing its length. It might be more straightforward to use 'samtools sort -n'.
- tom blackwell - On Fri, 31 Mar 2017, ?? wrote: > Hi all, > > I generated some sam files with vDjer and wanted to apply these files to > RSEM. > To this end, I used commands as below: > > (1) samtools-0.1.19/samtools view -1 -bS vdjer.sam > vdjer.bam > (2) samtools-0.1.19/samtools view -H vdjer.bam > vdjer.namesort.sam > (3) samtools-0.1.19/samtools view vdjer.bam | tr '\t' '~' | paste - - | > sort -S 3G | awk '{print $1 "\n" $2}' | tr '~' '\t' >> vdjer.namesort.sam > (4) samtools-0.1.19/samtools view -bS vdjer.namesort.sam > > vdjer.namesort.bam > > There were no error in step (1), (2) and (3). Then, in step (4), I got an > error like this: > "*Parse error at line 24: sequence and quality are inconsistent* > *Aborted (core dumped)*". > > Here is the line 24 in my vdjer.namesort.sam file: > > SRRXXXX.16743551 99 vjf_13_TGTGCGAGGTTTATGATTACCTTTGCGGGGGAAGCTTTT > GATATCTGG 193 255 76M = 276 159 > TCTGTGACCGCCGCAGACAC > GGCCGTATATTACTGTGCGAGGTTTATGATTACCTTTGCGGGGGAAGCTTTTGATA > @@@DDBBDFHHHHI8)CG GIDHAF6?AFGGHGIIIFEEHGEHEEEEECCD@;@CCCCC@BBB7@>B<8@ > @@CA<CCSRR2780299.16743551 147 > vjf_13_TGTGCGAGGTTTATGATTACCTTTGCGGGGGAAGCTTTTGATATCTGG 276 255 > 76M = 193 159 CCAAGGGAGAATGGTCACCGTCTCTTCAGCCTCCACCAAGGGCC > CATCGGTCTTCCCCCTGGCGCCCTGCTCCAGG > DDDDDDDEDDCCDC?<);DDDBDCCDDDB?A;;;;ECFFFHF > EHA<HJIJIHF<IHGEEADIIHDHHHDFDADC@@ > > Could anyone help me out? > Looking forward your reply. > > Best, > > Yue > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help