Hi everyone! I have a problem with my bash code, which I added down here. I would like to automatize the my RNA-seq workflow and I tried to write this bash code. (I am pretty new in bash and programming.) I expect several steps from my code. These are;
changing the directory into source directory and give me a notification. (It works fine)
creating a file array with finding all files that is named as accepted_hits.bam in source directory and its sub-folder.(Problem occurs here. My code scans all computer and i have a memory error.)
and run featureCounts.
echo 'Going to $SOURCE_DIR'
for file in $FILE_ARRAY; do
echo "Working on $serial_number"
mkdir -p $TARGET_DIR/$serial_number
featureCounts -t $SOURCE_DIR/$file -a /home/cilga/Desktop/VPC/ref/hg19/hg19.gtf -o $TARGET_DIR$serial_number done