EXITING because of FATAL ERROR: Read1 and Read2 are not consistent, reached the end of the one.....

390 views
Skip to first unread message

Stephen Chapman

unread,
Oct 16, 2017, 10:10:33 AM10/16/17
to rna-star
Hi all, I'm in of some of your help again...

I'm running the second STAR command for mapping with a simple test folder with two fastq files inside and receiving this error:

Oct 16 14:47:32 ...... FATAL ERROR, exiting

Stephens-MBP:Desktop stephenchapman$   EXITING because of FATAL ERROR: Read1 and Read2 are not consistent, reached the end of the one before the other one

-bash: EXITING: command not found

Stephens-MBP:Desktop stephenchapman$ SOLUTION: Check you your input files: they may be corrupted


I have a feeling that STAR is trying to use the first fastq and second fastq as the forward and reverse respectively which should not be the case.  The command I am using is:


for i in {0..2}
do
STAR --runThreadN 8 --genomeDir /Volumes/Seagate_Backup_Plus_Drive/WATBIO/genomeDir/ --readFilesIn /Users/stephenchapman/Desktop/TEST_FC0804/*.fastq --sjdbGTFfile /Volumes/Seagate_Backup_Plus_Drive/WATBIO/Sbicolor_v3.0.1/Sbicolor_313_v3.1.gene.gtf --outSAMtype BAM SortedByCoordinate --outFileNamePrefix /Volumes/Seagate_Backup_Plus_Drive/WATBIO/TEST_STAR_OUTPUT_andrea3 --quantMode GeneCounts; 
done

Any advice on this please?

Kind regards

Stephen

Alexander Dobin

unread,
Oct 17, 2017, 2:46:59 PM10/17/17
to rna-star
Hi Stephen,

indeed, *.fastq will expand into two (or more) files which will be treated as PE reads.
If you want to map several files in the same run (everything will be output into one set of files), you would need to list these files separated by commas and no spaces, e.g.
--readFilesIn exp1.fastq,exp2.fastq,exp3.fastq
If you want to do it with auto expansion, you can try
--readFilesIn `ls -m /path/to/FASTQ/*.fastq | tr -d ' \n'`

Also, I am not sure what the "for i in {0..2}" cycle is doing, the i variable does not seem to appear anywhere.

Cheers
Alex

Stephen Chapman

unread,
Oct 18, 2017, 11:14:04 AM10/18/17
to rna-star
Hi Alex, 

Many thanks for the reply. Just one more question please. Why do I get just one output set of files for multiple fastq.files? I was expecting to get a set of output files for each fastQ file include.

For example, in the above example, we have ~250 fastQ files coming from different treatments that we want to map onto a reference genome. We were expecting to receive a gene count table for each FASTQ and the mapping stats for each library.

Cheers

S.

Alexander Dobin

unread,
Oct 19, 2017, 11:38:56 AM10/19/17
to rna-star
Hi Stephen,

sorry, it was not clear to me that you wanted to process each file separately - in this case, you need to have a cycle over all files with one STAR job for each.
I think something like this should work:

for ff in `cd /Users/stephenchapman/Desktop/TEST_FC0804/; ls *.fastq`
do
  mkdir $ff
  cd $ff
  STAR ....... --readFilesIn  /Users/stephenchapman/Desktop/TEST_FC0804/$ff
  cd ..
done

Cheers
Alex
Reply all
Reply to author
Forward
0 new messages