alexdobin / STAR

RNA-seq aligner
MIT License
1.77k stars 495 forks source link

cannot insert junctions on the fly because of strand GstrandBit problem #2087

Open yujung-c opened 3 months ago

yujung-c commented 3 months ago

Hi STAR team! I was trying to use Star for alignment. The output is going to use in rsem-calculate-expression. When I used star alignment tool, it showed below messages.

【EXITING because of FATAL ERROR: cannot insert sequence on the fly because of strand GstrandBit problem SOLUTION: please contact STAR author at https://groups.google.com/forum/#!forum/rna-star

I found the similar history question and tried to set --limitSjdbInsertNsj as 4,000,000, but it doesn't work.

The STAR version was STAR_v2.7.10a

The STAR parameters I used for index generation:

STAR \
    --runMode genomeGenerate \
    --genomeDir $wd \
    --genomeFastaFiles $wd/GRCh38.p14.genome.fa \
    --sjdbGTFfile $wd/gencode.v45.annotation.gtf  \
    --limitSjdbInsertNsj 4000000 \
    --runThreadN 20

The processed was finished successfully in Log.out

Then, I ran for STAR alignment. The STAR parameters I used: (ps. For looping worked well in --quantMode GeneCounts )

g_index=/home/changyj307/changyj307/genome_index_p14_v45 # STAR genome index
out_dir=/home/changyj307/changyj307/77_RNAseq/align_rsem
files=/home/changyj307/changyj307/77_RNAseq/hs23839/clean_all_1

for i in $(ls $files/*_R1.fastq.gz | sort -u)
do
    STAR \
    --genomeDir $g_index \
    --readFilesIn ${i} ${i/_R1/_R2} \
    --runThreadN  20 \
    --twopassMode Basic \
    --outSAMtype BAM SortedByCoordinate \
    --outSAMunmapped Within \
    --readFilesCommand zcat \
    --genomeFastaFiles $g_index/GRCh38.p14.genome.fa \
    --quantMode TranscriptomeSAM \
    --outFileNamePrefix ${out_dir}/${i/$files/} ; done;

The Log.out showed:

STAR --genomeDir /home/changyj307/changyj307/genome_index_p14_v45 --readFilesIn /home/changyj307/changyj307/77_RNAseq/hs23839/clean_all_1/ip-D-M-L-18D-1_22C5KWLT3_L5_clean_R1.fastq.gz /home/changyj307/changyj307/77_RNAseq/hs23839/clean_all_1/ip-D-M-L-18D-1_22C5KWLT3_L5_clean_R2.fastq.gz --runThreadN 20 --twopassMode Basic --outSAMtype BAM SortedByCoordinate --outSAMunmapped Within --readFilesCommand zcat --genomeFastaFiles /home/changyj307/changyj307/genome_index_p14_v45/GRCh38.p14.genome.fa --quantMode TranscriptomeSAM --outFileNamePrefix /home/changyj307/changyj307/77_RNAseq/align_rsem//ip-D-M-L-18D-1_22C5KWLT3_L5_clean_R1.fastq.gz STAR version: 2.7.10a compiled: 2022-01-14T18:50:00-05:00 :/home/dobin/data/STAR/STARcode/STAR.master/source Mar 11 01:02:40 ..... started STAR run Mar 11 01:02:40 ..... loading genome STAR --genomeDir /home/changyj307/changyj307/genome_index_p14_v45 --readFilesIn /home/changyj307/changyj307/77_RNAseq/hs23839/clean_all_1/ip-D-M-L-18D-1NP-1_22C5KWLT3_L6_clean_R1.fastq.gz /home/changyj307/changyj307/77_RNAseq/hs23839/clean_all_1/ip-D-M-L-18D-1NP-1_22C5KWLT3_L6_clean_R2.fastq.gz --runThreadN 20 --twopassMode Basic --outSAMtype BAM SortedByCoordinate --outSAMunmapped Within --readFilesCommand zcat --genomeFastaFiles /home/changyj307/changyj307/genome_index_p14_v45/GRCh38.p14.genome.fa --quantMode TranscriptomeSAM --outFileNamePrefix /home/changyj307/changyj307/77_RNAseq/align_rsem//ip-D-M-L-18D-1NP-1_22C5KWLT3_L6_clean_R1.fastq.gz STAR version: 2.7.10a compiled: 2022-01-14T18:50:00-05:00 :/home/dobin/data/STAR/STARcode/STAR.master/source Mar 11 01:03:27 ..... started STAR run Mar 11 01:03:28 ..... loading genome

The err.out showed:

EXITING because of FATAL ERROR: cannot insert sequence on the fly because of strand GstrandBit problem SOLUTION: please contact STAR author at https://groups.google.com/forum/#!forum/rna-star

Many thanks for your helping! YuJung

alexdobin commented 3 months ago

Hi YuJung,

Please remove --genomeFastaFiles from the mapping command, you do not need it since you already used it in the genome generation step.