STAR errors out during alignment



I'm running STAR on a couple of FASTQ files (~115M reads). Here is my exact command:

STAR --genomeDir /path/to/GRCh38.p12 
          --outFilterType BySJout 
          --outFilterMultimapNmax 20 
          --alignSJoverhangMin 8 
          --alignSJstitchMismatchNmax 5 -1 5 5 
          --alignSJDBoverhangMin 10 
          --outFilterMismatchNmax 999 
          --outFilterMismatchNoverReadLmax 0.04 
          --alignIntronMin 20 
          --alignIntronMax 100000 
          --alignMatesGapMax 100000 
          --genomeLoad NoSharedMemory 
          --outSAMmapqUnique 60 
          --outSAMmultNmax 1 
          --outSAMstrandField intronMotif 
          --outSAMtype BAM SortedByCoordinate 
          --outReadsUnmapped None 
          --outFileNamePrefix ${sample_name}. 
          --outSAMattrRGline ID:GRPundef 
          --chimSegmentMin 12 
          --chimJunctionOverhangMin 12 
          --chimSegmentReadGapMax 3 
          --chimMultimapNmax 10 
          --chimMultimapScoreRange 10 
          --chimNonchimScoreDropMin 10 
          --chimOutJunctionFormat 1 
          --quantMode GeneCounts 
          --twopassMode Basic 
          --peOverlapNbasesMin 12 
          --peOverlapMMp 0.1 
          --outWigType wiggle 
          --outWigStrand Stranded 
          --outWigNorm RPM 
          --limitBAMsortRAM 160000000000 
          --outSAMunmapped Within 
          --readFilesCommand zcat 
          --readFilesIn  ${fq1} ${fq2} 
          --runThreadN 12

I'm giving this 128G of RAM on my cluster, and larger files have run successfully. This one always fails at the started mapping stage though, with the bad_alloc error. I don't understand how 128G of RAM would be insufficient. Even without the 12 threads parameter, I run into the same error.

Here is the STDOUT:

Jul 13 11:31:28 ..... started STAR run
Jul 13 11:31:28 ..... loading genome
Jul 13 11:33:30 ..... started 1st pass mapping
Jul 13 12:10:31 ..... finished 1st pass mapping
Jul 13 12:10:33 ..... inserting junctions into the genome indices
Jul 13 12:12:50 ..... started mapping

and the STDERR:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

How can I fix this and get STAR to run?

EDIT: I tried running the command on the first 1000 lines of the FASTQ files and it ran to completion. So it's a matter of resources - the command is accurate.





updated 2 hours ago by


written 3 hours ago by


Source link