Question: Writing scripts for a single vs all chromosomes
gravatar for Antonio.Aubry
12 months ago by
Antonio.Aubry10 wrote:

I'm new to RNA-seq data sets (and programming in general) and so far have only analyzed sample data from a single chromosome from various papers. My question is, aside from the amount of time required to process the samples, how much different would a basic shell script look? For instance, here is a simple script I wrote for aligning data from a single chromosome:

    set -euo pipefail
mkdir -p sam
for SAMPLE in $(cat $SAMPLES)

    hisat2 -p $CPUS --dta -x $IDX -1 $R1 -2 $R2 -S $SAM

How much would I have to re-work this script for data from all chromosomes? Assuming I use an Illumina sequencer, does each chromosome have its own fastq file which would require me to concatenate them or does all the data from one sample come in one fastq file (assuming single end reads)?

rna-seq shell script • 329 views
ADD COMMENTlink modified 12 months ago • written 12 months ago by Antonio.Aubry10

Thanks for the answers guys. Much appreciated.

ADD REPLYlink written 12 months ago by Antonio.Aubry10

If answers were helpful, feel free to upvote and accept:

enter image description here

ADD REPLYlink written 12 months ago by ATpoint31k
gravatar for shawn.w.foley
12 months ago by
shawn.w.foley1.2k wrote:

All of the data will come in a single fastq file per sample (or two files for paired end data). The chromosome information cannot be determined until after mapping.

So for sample 1 you'll either have sample1.fastq for single end or sample1_R1.fastq and sample1_R2.fastq for a paired end library. I don't see anything in the sample script that would need to be changed to account for a larger analysis assuming you have the proper index generated (and as always >8 CPUs will allow faster mapping).

ADD COMMENTlink written 12 months ago by shawn.w.foley1.2k
gravatar for swbarnes2
12 months ago by
United States
swbarnes27.5k wrote:

A fastq or bam is not chromosome-specific unless someone aligns it and picks out the reads aligning to one chromosome. So you generally won't be looping through multiple files for a single sample. You'll just align one sample's fastq to the whole genome, and have one bam for the whole genome.

ADD COMMENTlink written 12 months ago by swbarnes27.5k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1880 users visited in the last hour