Hi,
I have a total of 197 PE samples (R1 and R2). I am trying to run STAR aligner with all these files simultaneously. I am trying with the following command. However, it seems something wrong with this script.
any recommendation
thanks much
Using ls to feed a loop or an array is not a good idea, better use globing or find (yes, I know the irony, I have advocated using ls exactly in this manner).
As already noted by rpolicastro , STAR expects the input file names separated by a space.
The output of the ls raw_data will include both R1 and R2 files, so the file names you are using will be wrong. They will be something like
you have an echo in front of your STAR command, so nothing will be run, the command will be echoed to the screen. This is used to troubleshoot the command, not to run it.
You are missing the --genomeDir argument preceding the index.
Once you fix these issues, try again, and if something goes wrong, please post the error message as well, because "it seems something wrong with this script" is not informative at all.
I tried with or without a comma. However, it is showing the same error. Also, I tried with ls before raw_data. It is showing the following ERROR.
ls: cannot access raw_data/270_R1.fastq,raw_data/270_R2.fastq: No such file or directory
ls: cannot access raw_data/272_R1.fastq,raw_data/272_R2.fastq: No such file or directory
ls: cannot access raw_data/274_R1.fastq,raw_data/274_R2.fastq: No such file or directory
ls: cannot access raw_data/278C_R1.fastq,raw_data/278C_R2.fastq: No such file or directory
ls: cannot access raw_data/284C_R1.fastq,raw_data/284C_R2.fastq: No such file or directory
There should be a space between the two file names, not a comma.
I tried but not working.
Don't forget to define your read groups (
--outSAMattrRGline
) if you're doing multi-sample alignment.