alexdobin / STAR

RNA-seq aligner
MIT License
1.85k stars 506 forks source link

Broken pipe issue with gunzip #1466

Open omicz opened 2 years ago

omicz commented 2 years ago

I have encountered an issue with the latest STAR release (v2.7.10a) on MacOS, though downgrading to v2.7.9a has resolved this issue, I wanted to bring attention to it.

When running an alignment with STAR, I received an error message: gunzip: error writing to output: broken pipe along with an alert saying my fastq.gz files were unable to be unzipped. However, the file was not corrupted, and I was able to use gunzip with the file path directly to uncompress and recompress with no issue. I will list my code below, unfortunately, I already overwrote the logs but I can reproduce them after my current job finishes running if that would be helpful. Thanks!

cd path/to/directory

find ./data \
-type f -name "*.fastq.gz" | \
while read line; do
dirname=$(dirname ${line});
fname=$(basename ${line} _R1_001.fastq.gz);
  echo "Processing $fname";
  STAR \
  --runThreadN 8 \
  --genomeDir ~/Bioinformatics/star/genome \
  --sjdbGTFfile ~/Bioinformatics/star/gtf/gencode.v39.annotation.gtf \
  --sjdbOverhang 99 \
  --outFilterScoreMinOverLread 0.4 \
  --outFilterMatchNminOverLread 0.4 \
  --outFileNamePrefix ~/Bioinformatics/star/projectDirectory/${fname}/ \
  --readFilesIn ${dirname}/${fname}_R1_001.fastq.gz ${dirname}/${fname}_R2_001.fastq.gz \
  --readFilesCommand gunzip -c \
  --outReadsUnmapped Fastx \
  --outSAMtype BAM SortedByCoordinate;
  echo "Done";
done
alexdobin commented 2 years ago

Hi @omicz

if you can rerun and send me the Log.out files, it would be great! I am getting reports of seg-faults with 2.7.10a, but cannot reproduce it, unfortunately.

Cheers Alex

antoine4ucsd commented 4 months ago

I have the same issue. was it solved?