Entering edit mode
2.2 years ago
kcarey
•
0
Hey all, I was wondering if you guys could help me figure out how to correct the "--ReadFilesIn" part of my code....I keep getting "EXITING because of fatal input ERROR: could not open readFilesIn=.{sample}.fastq"
This is the code I used:
#Aligning all fastq files to HG-38
for i in cat MatchedFastqList.txt | while read samples do
STAR --genomeDir /projects/home/genomeDir --runThreadN 16 --runMode alignReads --readFilesIn ${sample}.{sample}.fastq --sjdbGTFfile /projects/home/genomeDir 19/GCF_000001405.40_GRCh38.p14_genomic.gtf --outReadsUnmapped Fastx done
Also....this is the fastq formats in my list MatchedFastqList.txt " OV33.FBHHHHHHS_G7_ITGACVA.fastq"
Try something like this:
Hey! Thank you so much for that. I tried that! Still getting error
EXITING because of fatal input ERROR: could not open readFilesIn=Read1
Hmm.. Are the file names in MatchedFastqList.txt with quotes?
Also, have you tried to just pick the first line from MatchedFastqList.txt and try to run STAR (without the loop)?
Can you show us an example of what MatchedFastqList.txt looks like? E.g.,
head MatchedFastqList.txt
I have discovered it's not the loop, it is correctly grabbing the files, the issue is it's telling me it can not read the GenomeDir.
EXITING because of FATAL ERROR: could not open genome file /projects/home/kcarey8/FinalMayodownloads/Matched/Batch2/Fastq/Indexes/ncbi-genomes-2022-09-19/GCF_000001405.40_GRCh38.p14_genomic.fna//genomeParameters.txt SOLUTION: check that the path to genome files, specified in --genomeDir is correct and the files are present, and have user read permsissions
Oct 17 10:51:28 ...... FATAL ERROR, exiting STAR --genomeDir /Indexes/ncbi-genomes-2022-09-19/GCF_000001405.40_GRCh38.p14_genomic.fna --runThreadN 20 --runMode alignReads --readFilesIn OV74.FCD1U68ACXX_L8_IACTGAT.fastq --sjdbGTFfile /Indexes/ncbi-genomes-2022-09-19/GCF_000001405.40_GRCh38.p14_genomic.gtf --outSAMtype BAM Unsorted --outReadsUnmapped Fastx --outFileNamePrefix Aligned_OV74.FCD1U68ACXX_L8_IACTGAT.fastq STAR version: 2.7.10a compiled: 2022-01-14T18:50:00-05:00 :/home/dobin/data/STAR/STARcode/STAR.master/source Oct 17 10:51:28 ..... started STAR run Oct 17 10:51:28 ..... loading genome
I have also Chmod 755 all files so they are executable. For some reason it does not like the code....I used the absolute file path below:
for i in *.fastq ; do STAR --genomeDir /Indexes/ncbi-genomes-2022-09-19/GCF_000001405.40_GRCh38.p14_genomic.fna --runThreadN 20 --runMode alignReads --readFilesIn ${i} --sjdbGTFfile /Indexes/ncbi-genomes-2022-09-19/GCF_000001405.40_GRCh38.p14_genomic.gtf --outSAMtype BAM Unsorted --outReadsUnmapped Fastx --outFileNamePrefix Aligned_${i} ; done
You are reporting different errors.
First, in the original question, you specified the error was: "EXITING because of fatal input ERROR: could not open readFilesIn=.{sample}.fastq"
Now, you are saying the error is: "EXITING because of FATAL ERROR: could not open genome file"
In addition, it seems you are mixing the paths and the files, f.e:
genomeParameters.txt should not be the "genome file"
I suggest to clean up a bit your code, and command, and report the exact error you are getting.
As I fix the issues I develop a new issue. I am not trying to confuse the errors.