Empty bam file

209 views
Skip to first unread message

Tevfik Kitapci

unread,
Jul 22, 2019, 10:12:58 AM7/22/19
to rna-star
Hi,
Apologies if I am doing a double post but I am not sure if github or this forum is more active I asked this question here as well




Hi,
My STAR run produces an empty bam file and I can't understand what is the problem and I can't find any error messages in the log files

I downloaded STAR from conda

conda install -c bioconda star

it is version 2.7.1a

This is my command

STAR --genomeDir $genomeDir \
--readFilesIn $mate1_path $mate2_path \
--outSAMtype BAM SortedByCoordinate \
--outFileNamePrefix $sample_name \
--quantMode GeneCounts \
--twopassMode Basic \
--readFilesCommand zcat

Here are my log files (I also attached them to the message I included log files both from genome generation step and mapping)

https://drive.google.com/open?id=1Csi7U0QzAtTALXid-i313PvILFUSUmvq

For the genome generation I downloaded the followings as suggested in the STAR manual

wget ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M22/GRCm38.primary_assembly.genome.fa.gz

wget ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M22/gencode.vM22.chr_patch_hapl_scaff.annotation.gtf.gz

then unzipped them and run the following

STAR --runMode genomeGenerate --genomeDir $working_dir --genomeFastaFiles $reference_fasta --sjdbGTFfile $annotation_file --sjdbOverhang $length

in the output for genome generation I see that is it completed successfully

Jul 19 14:34:07 ..... started STAR run
Jul 19 14:34:07 ... starting to generate Genome files
Jul 19 14:35:18 ... starting to sort Suffix Array. This may take a long time...
Jul 19 14:35:32 ... sorting Suffix Array chunks and saving them to disk...
Jul 19 16:00:52 ... loading chunks from disk, packing SA...
Jul 19 16:01:54 ... finished generating suffix array
Jul 19 16:01:54 ... generating Suffix Array index
Jul 19 16:05:34 ... completed Suffix Array index
Jul 19 16:05:34 ..... processing annotations GTF
Jul 19 16:05:51 ..... inserting junctions into the genome indices
Jul 19 16:14:53 ... writing Genome to disk ...
Jul 19 16:15:18 ... writing Suffix Array to disk ...
Jul 19 16:18:32 ... writing SAindex to disk
Jul 19 16:18:46 ..... finished successfully

I will appreciate if you can suggest a solution to this

Thanks
Best Regards
Hamdi

STAR_log_files_from_genome_generation_and_mapping.zip

Alexander Dobin

unread,
Jul 22, 2019, 11:23:07 AM7/22/19
to rna-star
Hi Tevfik,

all of your commands seem OK, I suspect this is caused by the partition not supporting fifo files that are needed for unzipping on the fly.
There are several things to try:
1. Check if fifo files are supported by executing
mkfifo tmp1.fifo
in the run directory.
2. Unzip the fastq files and map them without --readFilesCommand zcat option.
3. If you have a partition that supports fifo files, you can make a temp directory there and specify it in --outTmpDir.

Cheers
Alex

Tevfik Kitapci

unread,
Jul 22, 2019, 12:30:15 PM7/22/19
to rna-star
Dear Alex,
You are right it seems it is a fifo related problem. 

I run 

"mkfifo tmp.fifo"

it failed in the partition that hosts the input files.

I have a question

Input data is hosted on partition X and the output is written on partition Y.

Does both X and Y need to support fifo files for the --readFilesCommand zcat command or just the partition that support the input files ?

Thanks
Best Regards
Tevfik Hamdi Kitapci

Tevfik Kitapci

unread,
Jul 22, 2019, 12:48:41 PM7/22/19
to rna-star
Dear Alex,
I moved to a partition with fifo support (both input files and output files are located on the same partition that support fifo files)

Now the mapping is started to show progress. I will post here if I encounter any problem otherwise once my mapping jobs are completed I will close this issue.

Thanks a lot for your help

Best Regards
Tevfik Hamdi Kitapci

Alexander Dobin

unread,
Jul 24, 2019, 9:57:31 AM7/24/19
to rna-star
Hi Tevfik,

only the temporary file directory has to support fifo. By default, it resides in the output directory, which is controlled by --outFileNamePrefix, which defaults to current (run) directory.
You can change the temp directory with --outFileNamePrefix

Cheers
Alex
Reply all
Reply to author
Forward
0 new messages