Merging .bam files in STAR
0
0
Entering edit mode
2.2 years ago

Hi there,

I have successfully created an annotated genome index to map my paired-end rna-seq reads and have run:

STAR --runMode alignReads --genomeDir /home/rnaseq/ref/ --outSAMtype BAM SortedByCoordinate --readFilesIn R21_1.fq.gz R21_2.fq.qz --runThreadN 10 --outFileNamePrefix /home/rnaseq/fastq/mapped/R21 --readFilesCommand gunzip

I believe in order to get one .bam file from my paired-end reads I insert both file names with a space between after --readFilesIn. When I run this I receive this error message:

!!!!! WARNING:  Could not ls R22_1.fq.qz
EXITING: because of fatal INPUT file error: could not open read file: R22_2.fq.qz
SOLUTION: check that this file exists and has read permision.

I have played around with the files I am using and their order and it seems that no matter what file it is, STAR is unable to read the second file listed. If I run them individually they map successfully so I don't think there is anything wrong with the file itself.

Any help would be really appreciated as this is my first time processing rna-seq data!

alignment RNA-Seq STAR • 978 views
ADD COMMENT
1
Entering edit mode

Try using --readFilesCommand zcat instead of gunzip.

In this case, you won't need to unzip your files!

ADD REPLY
0
Entering edit mode

That has worked, thanks so much!

ADD REPLY
0
Entering edit mode

what is the output of ls -lah R21_1.fq.gz R21_2.fq.qz

ADD REPLY
0
Entering edit mode

I believe it is because my --readFilesCommand gunzip -c command was only unzipping the first file and not the second and therefore the second .fq.gz file was unreadable.

I have now unzipped both files and run the command without --readFilesCommand and it has worked. However, I don't want to have to do this for all of my samples.

Do you know how I can tweak the command to unzip both files?

ADD REPLY

Login before adding your answer.

Traffic: 1775 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6