I have a few thousand FastQ files from a single cell RNA-seq experiment that I want to align and quantify with Salmon. (Paired-end, Illumina Smart-Seq2, Human)
Because the file names vary, I thought using GNU parallel to feed the files to salmon would be simpler than creating a for loop script (I have limited experience with bash and regex).
This was my code (slurm stuff excluded):
module load parallel
module load salmon
parallel salmon quant -i /work/InternalMedicine/s184335/genome_folder/alias/hg38/salmon_sa_index/default/. -l A --validateMappings --gcBias --seqBias --threads 48 -o MDS_salmon_pseudoalignmentandquant -1 {} -2 {=s/_R1_001_val_1/_R2_001_val_2/=} ::: *_R1_001_val_1.fq.gz
Now, when I take a look at the output file, for most of the samples, I get something like this:
where the program reloads salmon before it finishes analyzing the previous sample, and moves on.
In some cases, I will also get an error message saying salmon quant was invoked incorrectly.


Strangely though, towards the end of the output file, it shows several samples that were successfully mapped and quantified by salmon (I think).
However, if I go to the results folder, there is only one quant.sf file for one sample.
One last thing of note is that, when I submit the batch script (I'm using an HPC) the job gets interrupted every so often because of a node fail.
I have tried running salmon quant with only one sample and that seems to work okay.
Could GNU parallel somehow be causing these problems? Perhaps my script is problematic and makes Salmon prematurely move on to the next sample, without mapping/writing the results?
I'm quite lost as I can't see an obvious error message and I'm rather new to bioinformatics. Would appreciate any help.