When I run the script it overwrites the R1 files. All the R1 replaced with text files.
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 10_R1.fastq
-rwxr-xr-x 1 cent cent 5.2G Jul 26 20:20 10_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 11_R1.fastq
-rwxr-xr-x 1 cent cent 5.4G Jul 26 20:14 11_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 12_R1.fastq
-rwxr-xr-x 1 cent cent 5.9G Jul 26 20:18 12_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 13_R1.fastq
-rwxr-xr-x 1 cent cent 4.9G Jul 26 20:17 13_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 14_R1.fastq
-rwxr-xr-x 1 cent cent 5.9G Jul 26 20:18 14_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 15_R1.fastq
-rwxr-xr-x 1 cent cent 6.5G Jul 26 20:10 15_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 16_R1.fastq
-rwxr-xr-x 1 cent cent 6.6G Jul 26 20:22 16_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 17_R1.fastq
-rwxr-xr-x 1 cent cent 6.5G Jul 26 20:15 17_R2.fastq
-rwxr-xr-x 1 cent cent 926 Jul 27 23:10 18_R1.fastq
Use
echoat start of the command/home/cent/anaconda3/envs/shannon_env/bin/shannon_cpp shannonto make sure command lines look ok. If not you should get an idea of what needs to be changed.A better option is to grab sample names by doing:
Remove echo after checking the function.
However, your output directory and logs will have unnecessarily long names. Assuming that base name of the files is unique, you can try this:
Remove echo for execution after checking the function.
I suggest you to use parallel for this kind of work.
It not working. : No such file or directory I give all the input files. If I run interactively it works.