I am running a command line software on multiple folder/samples.Each folder has such files *fastq.gz.
Below is an example of a folder.
Sample_EC_only/EC_only_S1_L005_I1_001.fastq.gz Sample_EC_only/EC_only_S1_L005_R1_001.fastq.gz Sample_EC_only/EC_only_S1_L005_R2_001.fastq.gz Sample_EC_only/EC_only_S1_L006_I1_001.fastq.gz Sample_EC_only/EC_only_S1_L006_R1_001.fastq.gz
I am trying to run this using gnu parallel for multiple softwares,but having issues with extracting the "ID" of the folder.
parallel -j $NSLOTS --xapply \
" echo {1} \
/home/rob2056/software/cellranger-2.2.0/cellranger count --id = "{basename} {1}" \
--transcriptome=$ref_data \
--fastqs={1} \
" ::: $TMPDIR/FASTQ/Sample*
I want to extract for e.g. "Sample_EC_only" as a pattern from the folder inside gnu parallel. --fastqs is able to get the path using {1} ,but having issues with --id option.I have tried various options to extract a pattern from the paths in {1} but not working.
The --id parameter needs a pattern extracted from the path in {1} so that it can create a output dir.
Each {1} consists of e.g. (shown below only for one sample)
/tmp/FASTQ/Sample_EC_only