Entering edit mode
3.4 years ago
urvashi_s
•
0
Hi, I am trying to map to the hg38 genome assembly. I was running the following script:
#!/bin/bash
#SBATCH --time=12:00:00
#SBATCH --account=[hidingforthepost]
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=40
#SBATCH --mem-per-cpu=2375M
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=[hidingforthepost]
#SBATCH --output=slurm_%x.out
Dir=/home/urvashi/projects/def-dlanglai/urvashi
DirM=/home/urvashi/projects/def-dlanglai/urvashi/Temp1
module load nixpkgs/16.09 intel/2018.3 hisat2/2.2.0
for Sample_Name in $(< $Dir/MSC_Ped_Ctrl_Lina/Sample_Names_MSC.txt)
do
hisat2 --trim5 6 --rna-strandness FR -x $Dir/hg38/genome -1 $Dir/MSC_Ped_Ctrl_Lina/${Sample_Name}_R1_Pairedtrimmed.fastq -2 $Dir/MSC_Ped_Ctrl_Lina/${Sample_Name}_R2_Pairedtrimmed.fastq -S $DirM/${Sample_Name}.sam
done
Sample_Names_MSC.txt
contains the names of the files.
However, this script gave multiple errors and it seemed as if there was an issue with $Dir
and $DirM
.
So I tried to run a simple script to test just one sample:
#!/bin/bash
#SBATCH --time=12:00:00
#SBATCH --account=[hidingforthepost]
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=40
#SBATCH --mem-per-cpu=2375M
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=[hidingforthepost]
#SBATCH --output=slurm_%x.out
module load nixpkgs/16.09 intel/2018.3 hisat2/2.2.0
hisat2 --trim5 6 --rna-strandness FR -x /home/urvashi/projects/def-dlanglai/urvashi/MSC_Ped_Ctrl_Lina/hg38/genome -1 MSC134-p28-Ctrl_R1_Pairedtrimmed.fastq -2 MSC134-p28-Ctrl_R2_Pairedtrimmed.fastq -S MSC134-p28-Ctrl.sam
(note that I changed where the hg38 directory was located, hence the change in the path for the above script). I've also tried other scripts with the paths for the R1 and R2 and .sam files, but to no avail. I keep getting the following error:
(ERR): Argument expected in next token!
Exiting now ...
/var/spool/slurmd/job14227894/slurm_script: line 15: MSC134-p28-Ctrl_R2_Pairedtrimmed.fastq: command not found
or something similar every time. Any suggestions/solutions?
Did you hit Enter before the R2 file name by any chance (to make the script more readable perhaps)? The shell is seeing 2 commands where there is just one.
This is not a HISAT2 error by the way, it's a mistyped shell command - a shell error.