Entering edit mode
20 months ago
Yihan • 0
I'm trying to create a matrix from the raw counts of genes.
Here is the script. It's a nano file and I ran it with srun command.
#!/bin/bash #SBATCH --mem=64G for i in *ReadsPerGene.out.tab; cut -f1,4 $i | grep -v "_" > data/deseq2/counts_4thcol/`basename $i ReadsPerGene.out.tab`_counts.txt; done
Because I got "permission denied" error from running this nano file, I tried to run it line by line. However, then I got this error
-bash: syntax error near unexpected token `cut'
I'm wondering what I can do to make cut be recognized?
Thank you. I tried this, and seems like the file is created but I got this:
Please show us your full command.
Can you get this to work without the loop?
Yes. I figured it out! Thank you
What was the problem?