Samtools software error
1
0
Entering edit mode
4.7 years ago

Dear all,

When I did the RNA seq analysis using the "STAR-SAMTOOLS-HTSEQ" pipeline, I meet an error in the samtools step. Here is my script:

module load samtools
samtools sort -n -T /home/chan7_1_test/tmp/ -o /home/chan7_1_test/chan7_1_aftersort /home/chan7_1_test/chan711_mappedAligned.out.bam

it runs pretty good for some of my samples, but for several samples, it report an error:

[E::bam_read1] CIGAR and query sequence lengths differ for GWNJ-0850:425:GW1812271727:1:1122:23054:8657
samtools sort: truncated file. Aborting

I searched internet but it still error report and haven't been resolved. Will be really appreciated if you could give some advices. Thank you!!

RNA-Seq • 1.5k views
ADD COMMENT
0
Entering edit mode

what is the version of your tools ?

ADD REPLY
0
Entering edit mode

Hi, it is this version : samtools/gcc/5.3.0/1.6

ADD REPLY
0
Entering edit mode

Please run samtools --version and paste the output here.

ADD REPLY
0
Entering edit mode

Hi, it is this:

samtools 1.6
Using htslib 1.6
Copyright (C) 2017 Genome Research Ltd.

So it maybe samtools 1.6 ?

Thank you!

ADD REPLY
0
Entering edit mode

Yes, it is. Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLY
0
Entering edit mode

WIll do! thank u. and any suggestions for the error...

ADD REPLY
0
Entering edit mode

I don't think it's a bug with samtools (anyway, you should update it) but rather with STAR. What's the version of star

ADD REPLY
0
Entering edit mode

Hi, the version of star is star/2.6.0 and no error report when using star...

ADD REPLY
0
Entering edit mode
4.7 years ago

star/2.6.0

update to 2.7.0

Furthermore, it looks like it's a known problem: https://github.com/alexdobin/STAR/issues/530#issuecomment-444913496

A few things I would suggest:

Run with the precompiled executables from bin/Linux_x86_64 and bin/Linux_x86_64_static, or compile your own with
$ cd source && make
Change the number of threads from 8 to 4.
Cut a few thousands reads around the problematic read and run mapping.
  

If the problem still occurs for the same read, I would need a sample of your data to reproduce the problem on my system.

ADD COMMENT
0
Entering edit mode

Thanks for your kindly reply! But I am not sure what is Run with the precompiled executables from bin/Linux_x86_64 and bin/Linux_x86_64_static, or compile your own with $ cd source && make

if it is a command or something else....

Here is my script for STAR (I will update it to 2.7.0 later..)

  1. index

STAR --runMode genomeGenerate --runThreadN 16 --genomeDir /home/STAR2/star_index/ --genomeFastaFiles /home/00166062_genome.fna --sjdbGTFfile /home/GCF_0016606_genomic.gtf --sjdbOverhang 149 --sjdbGTFfeatureExon CDS

  1. map

STAR --runThreadN 1 --genomeDir /home/star_index/ --readFilesIn /home/Chan7-1_R1_left_paired_trimmed.fq /home/Chan7-1_R2_right_paired_trimmed.fq --outFileNamePrefix /home/chan711_mapped --limitOutSJcollapsed 5000000 --limitIObufferSize 300000000 --outSAMtype BAM Unsorted --limitBAMsortRAM 87162435271

ADD REPLY

Login before adding your answer.

Traffic: 2524 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6