Question: How I deal with different lanes in RNA-seq alignment
0
gravatar for Angel
20 days ago by
Angel3.5k
Angel3.5k wrote:

Hi

I have Four lanes per sequencing run => 4 fastqs each so for each patient I have 16 Fastq files

I am using STAR for alignment by this code (each lane)

STAR --genomeDir ./hg38_Genome --readFilesIn ./fastq1./fastq2

At the end I would have 4 sam files

Should I merge sam files from each lane or I should merging lane when alignment by STAR?

Any help please?

Thank you

rna-seq star alignment • 224 views
ADD COMMENTlink modified 20 days ago by leaodel100 • written 20 days ago by Angel3.5k
5
gravatar for RamRS
20 days ago by
RamRS24k
Houston, TX
RamRS24k wrote:

I'd merge the FASTQs as that is easier.

ADD COMMENTlink written 20 days ago by RamRS24k
4
gravatar for cschu181
20 days ago by
cschu1811.8k
cschu1811.8k wrote:

If they are from the same replicate and are just spread across lanes to achieve more depth, you may as well merge them before alignment.

ADD COMMENTlink written 20 days ago by cschu1811.8k

Thank you, the reads are paired end so should I do like below?

STAR --genomeDir ./hg38_Genome --readFilesIn ./fastq1_lane1 ./fastq1_lane2 ./fastq1_lane3 ./fastq1_lane4 ./fastq2_lane1 ./fastq2_lane2 ./fastq2_lane3 ./fastq2_lane4
ADD REPLYlink written 20 days ago by Angel3.5k
2

Use cat to concatenate them into a single file per forward and reverse read.

ADD REPLYlink written 20 days ago by ATpoint23k

Sorry how? I mean use cat for locating the folders? or what?

ADD REPLYlink written 20 days ago by Angel3.5k

concatenating the individual fastq files into one file

ADD REPLYlink written 20 days ago by ATpoint23k
cat test_rep1.fasta 
ATGC

cat test_rep2.fasta 
TGCATGC

# merge together
cat test_rep1.fasta > merged.fasta
cat test_rep2.fasta >> merged.fasta

cat merged.fasta 
ATGC
TGCATGC
ADD REPLYlink modified 20 days ago • written 20 days ago by Kevin Blighe48k
2
gravatar for swbarnes2
20 days ago by
swbarnes26.5k
United States
swbarnes26.5k wrote:

As ATpoint said, concatenate the R1 files together with unix's cat command (you can do this on the compressed files), and do the same to the R2 files, and give those two combined files to STAR. But you can merge the bams together after the fact if you like with samtools merge.

Or, ask the people who made the fastqs for you to remake them with --no-lane-splitting.

ADD COMMENTlink modified 20 days ago by ATpoint23k • written 20 days ago by swbarnes26.5k

Sorry when I'm sorting my sam file by samtools sort -n I have one million non unique mapped reads after getting raw read counts by htseq but when I'm using picard samsort I only have 200000 non unique mapped reads

In your experiences what I'm doing wrong ?

Non unique mapped reads are too bad?

Should I use picard samsort then?

ADD REPLYlink modified 20 days ago • written 20 days ago by Angel3.5k
2
gravatar for leaodel
20 days ago by
leaodel100
EUA
leaodel100 wrote:

You don't have to concatenate your files beforehand when using STAR. Adding the files of read1 (followed by read 2 if using paired end data) separated by comma should do the trick and save you time: STAR --readFilesIn file1_1.fastq,file2_1.fastq file1_2.fastq,file2_2.fastq

ADD COMMENTlink written 20 days ago by leaodel100

Are you sure they won't be treated as different samples when comma-separated values are used? The manual states that this syntax is for multi-sample alignment.

ADD REPLYlink written 19 days ago by RamRS24k

It won't! I have processed several datasets where one sample comes with multiple .fastq files due to sequencing depth. It's essentially the same as concatenate - I, of course, tested before using. It's important not to put spaces between the files when you're feeding --readFilesIn.

ADD REPLYlink written 19 days ago by leaodel100
1

Looks like the STAR manual is wrong, then. It is the second most disappointing manual, right after RSEM.

ADD REPLYlink written 19 days ago by RamRS24k
Please log in to add an answer.

Help
Access

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