Hi all,
I need to come up with some kind of automated script that will align each sample to the my reference genome. I am using STAR to align reads. I have reads that look something like this (all paired end):
SRR112312_1.fastq.gz
SRR112312_2.fastq.gz
SRR112313_1.fastq.gz
SRR112313_2.fastq.gz
SRR112372_1.fastq.gz
SRR112372_2.fastq.gz
...
I have tried with code like this:
for i in $(ls *.fastq.gz | rev | cut -c 11- | rev | uniq)
My typical STAR command looks like this:
STAR --genomeDir /indices/human --readFilesIn SRR112312_1.fastq.gz SRR112312_2.fastq.gz --runThreadN 8 --outFileNamePrefix /alignment/treg_NBP_8_ --quantMode GeneCounts --readFilesCommand zcat
I tried using the answer from this post: bash loop for alignment RNA-seq data but im not having any luck. I would like to align each PE read to the genome to get a BAM file. In this example, there would be 3 BAM files. Also, all of my reads end as in _1.fastq.gz and _2.fastq.gz
If anyone can offer any help that would be much appreciated! Just jumping into scripting and this has been giving me a hard time. Thanks!