Question: How I deal with different lanes in RNA-seq alignment
0
gravatar for A
10 months ago by
A3.8k
A3.8k 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 • 823 views
ADD COMMENTlink modified 10 months ago by leaodel130 • written 10 months ago by A3.8k
5
gravatar for RamRS
10 months ago by
RamRS27k
Houston, TX
RamRS27k wrote:

I'd merge the FASTQs as that is easier.

ADD COMMENTlink written 10 months ago by RamRS27k
4
gravatar for cschu181
10 months ago by
cschu1812.3k
cschu1812.3k 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 10 months ago by cschu1812.3k

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 10 months ago by A3.8k
2

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

ADD REPLYlink written 10 months ago by ATpoint36k

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

ADD REPLYlink written 10 months ago by A3.8k

concatenating the individual fastq files into one file

ADD REPLYlink written 10 months ago by ATpoint36k
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 10 months ago • written 10 months ago by Kevin Blighe61k
2
gravatar for swbarnes2
10 months ago by
swbarnes27.9k
United States
swbarnes27.9k 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 10 months ago by ATpoint36k • written 10 months ago by swbarnes27.9k

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 10 months ago • written 10 months ago by A3.8k
2
gravatar for leaodel
10 months ago by
leaodel130
EUA
leaodel130 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 10 months ago by leaodel130

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 10 months ago by RamRS27k

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 10 months ago by leaodel130
1

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

ADD REPLYlink written 10 months ago by RamRS27k
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: 1491 users visited in the last hour