Skip to content

Instantly share code, notes, and snippets.

@DarwinAwardWinner
Last active August 29, 2015 14:16
Show Gist options
  • Save DarwinAwardWinner/41b15c522135536c5356 to your computer and use it in GitHub Desktop.
Save DarwinAwardWinner/41b15c522135536c5356 to your computer and use it in GitHub Desktop.
featureCounts slow running logs
# featureCounts on exonsBy(TxDb.Hsapiens.UCSC.hg19.knownGene, "gene")
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
Rsubread 1.16.1
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 2 BAM files ||
|| S star_results/S13/Aligned.out.bam ||
|| S star_results/S14/Aligned.out.bam ||
|| ||
|| Output file : ./.Rsubread_featureCounts_pid23009 ||
|| Annotations : ./.Rsubread_UserProvidedAnnotation_pid23009 ... ||
|| ||
|| Threads : 8 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : yes ||
|| Multimapping reads : not counted ||
|| Multi-overlapping reads : not counted ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
//================================= Running ==================================\\
|| ||
|| Load annotation file ./.Rsubread_UserProvidedAnnotation_pid23009 ... ||
|| Features : 272776 ||
|| Meta-features : 23459 ||
|| Chromosomes : 49 ||
|| ||
|| Process BAM file star_results/S13/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 14668849 ||
|| Successfully assigned reads : 2801116 (19.1%) ||
|| Running time : 0.54 minutes ||
|| ||
|| Process BAM file star_results/S14/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 16924553 ||
|| Successfully assigned reads : 2866553 (16.9%) ||
|| Running time : 0.62 minutes ||
|| ||
|| Read assignment finished. ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
# featureCounts on RepeatMasker repeats grouped by repClass
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
Rsubread 1.16.1
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 2 BAM files ||
|| S star_results/S13/Aligned.out.bam ||
|| S star_results/S14/Aligned.out.bam ||
|| ||
|| Output file : ./.Rsubread_featureCounts_pid7346 ||
|| Annotations : ./.Rsubread_UserProvidedAnnotation_pid7346 ( ... ||
|| ||
|| Threads : 8 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : yes ||
|| Multimapping reads : primary only ||
|| Multi-overlapping reads : counted ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
//================================= Running ==================================\\
|| ||
|| Load annotation file ./.Rsubread_UserProvidedAnnotation_pid7346 ... ||
|| Features : 5570906 ||
|| Meta-features : 22 ||
|| Chromosomes : 93 ||
|| ||
|| Process BAM file star_results/S13/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 14668849 ||
|| Successfully assigned reads : 8113436 (55.3%) ||
|| Running time : 0.54 minutes ||
|| ||
|| Process BAM file star_results/S14/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 16924553 ||
|| Successfully assigned reads : 9126360 (53.9%) ||
|| Running time : 0.62 minutes ||
## Before printing the next line, R hangs for several hours
|| ||
|| Read assignment finished. ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
## At this point, featureCounts does not finish, but rather R hangs
## for more hours. I terminated it after 16 hours total runtime.
# This is the do.count function
do.count <- function(bam, saf, ...) {
featureCounts(bam, annot.ext=saf,
isPairedEnd=FALSE,
...)$counts
}
# Running on randomly sampled 1/500th of the total features
> system.time({
+ x <- do.count(expdata[,"STAR.Bamfile"], saf[sample(seq(nrow(saf)), nrow(saf) / 500),],
+ nthreads=1, strandSpecific=1,
+ countPrimaryAlignmentsOnly=TRUE,
+ allowMultiOverlap=TRUE)
+ })
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
Rsubread 1.16.1
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 2 BAM files ||
|| S star_results/S13/Aligned.out.bam ||
|| S star_results/S14/Aligned.out.bam ||
|| ||
|| Output file : ./.Rsubread_featureCounts_pid26755 ||
|| Annotations : ./.Rsubread_UserProvidedAnnotation_pid26755 ... ||
|| ||
|| Threads : 1 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : yes ||
|| Multimapping reads : primary only ||
|| Multi-overlapping reads : counted ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
//================================= Running ==================================\\
|| ||
|| Load annotation file ./.Rsubread_UserProvidedAnnotation_pid26755 ... ||
|| Features : 10596 ||
|| Meta-features : 18 ||
|| Chromosomes : 48 ||
|| ||
|| Process BAM file star_results/S13/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 14668849 ||
|| Successfully assigned reads : 4376 (0.0%) ||
|| Running time : 0.48 minutes ||
|| ||
|| Process BAM file star_results/S14/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 16924553 ||
|| Successfully assigned reads : 4875 (0.0%) ||
|| Running time : 0.57 minutes ||
|| ||
|| Read assignment finished. ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
user system elapsed
82.893 0.581 64.470
# Running on randomly sampled 1/50th of the total features
> system.time({
+ x <- do.count(expdata[,"STAR.Bamfile"], saf[sample(seq(nrow(saf)), nrow(saf) / 50),],
+ nthreads=1, strandSpecific=1,
+ countPrimaryAlignmentsOnly=TRUE,
+ allowMultiOverlap=TRUE)
+ })
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
Rsubread 1.16.1
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 2 BAM files ||
|| S star_results/S13/Aligned.out.bam ||
|| S star_results/S14/Aligned.out.bam ||
|| ||
|| Output file : ./.Rsubread_featureCounts_pid26755 ||
|| Annotations : ./.Rsubread_UserProvidedAnnotation_pid26755 ... ||
|| ||
|| Threads : 1 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : yes ||
|| Multimapping reads : primary only ||
|| Multi-overlapping reads : counted ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
//================================= Running ==================================\\
|| ||
|| Load annotation file ./.Rsubread_UserProvidedAnnotation_pid26755 ... ||
|| Features : 105962 ||
|| Meta-features : 20 ||
|| Chromosomes : 84 ||
|| ||
|| Process BAM file star_results/S13/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 14668849 ||
|| Successfully assigned reads : 53095 (0.4%) ||
|| Running time : 0.49 minutes ||
|| ||
|| Process BAM file star_results/S14/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 16924553 ||
|| Successfully assigned reads : 58320 (0.3%) ||
|| Running time : 0.55 minutes ||
|| ||
|| Read assignment finished. ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
user system elapsed
302.078 1.696 283.672
# Running on randomly sampled 1/10th of the total features
> system.time({
+ x <- do.count(expdata[,"STAR.Bamfile"], saf[sample(seq(nrow(saf)), nrow(saf) / 10),],
+ nthreads=1, strandSpecific=1,
+ countPrimaryAlignmentsOnly=TRUE,
+ allowMultiOverlap=TRUE)
+ })
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
Rsubread 1.16.1
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 2 BAM files ||
|| S star_results/S13/Aligned.out.bam ||
|| S star_results/S14/Aligned.out.bam ||
|| ||
|| Output file : ./.Rsubread_featureCounts_pid26755 ||
|| Annotations : ./.Rsubread_UserProvidedAnnotation_pid26755 ... ||
|| ||
|| Threads : 1 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : yes ||
|| Multimapping reads : primary only ||
|| Multi-overlapping reads : counted ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
//================================= Running ==================================\\
|| ||
|| Load annotation file ./.Rsubread_UserProvidedAnnotation_pid26755 ... ||
|| Features : 529813 ||
|| Meta-features : 21 ||
|| Chromosomes : 91 ||
|| ||
|| Process BAM file star_results/S13/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 14668849 ||
|| Successfully assigned reads : 548639 (3.7%) ||
|| Running time : 0.50 minutes ||
|| ||
|| Process BAM file star_results/S14/Aligned.out.bam... ||
|| Single-end reads are included. ||
|| Assign reads to features... ||
|| Total reads : 16924553 ||
|| Successfully assigned reads : 641071 (3.8%) ||
|| Running time : 0.55 minutes ||
|| ||
|| Read assignment finished. ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
user system elapsed
5295.715 0.643 5282.844
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8
[9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8
attached base packages:
[1] grDevices datasets stats4 parallel graphics utils stats
[8] methods base
other attached packages:
[1] ShortRead_1.24.0
[2] GenomicAlignments_1.2.1
[3] Rsamtools_1.18.2
[4] BiocParallel_1.0.0
[5] xlsx_0.5.7
[6] xlsxjars_0.6.1
[7] rJava_0.9-6
[8] plyr_1.8.1
[9] org.Hs.eg.db_3.0.0
[10] RSQLite_1.0.0
[11] DBI_0.3.1
[12] magrittr_1.5
[13] doParallel_1.0.8
[14] iterators_1.0.7
[15] foreach_1.4.2
[16] annotate_1.44.0
[17] XML_3.98-1.1
[18] TxDb.Hsapiens.UCSC.hg19.knownGene_3.0.0
[19] GenomicFeatures_1.18.2
[20] AnnotationDbi_1.28.1
[21] Biobase_2.26.0
[22] Rsubread_1.16.1
[23] BSgenome.Hsapiens.UCSC.hg19_1.4.0
[24] BSgenome_1.34.0
[25] rtracklayer_1.26.2
[26] Biostrings_2.34.0
[27] XVector_0.6.0
[28] GenomicRanges_1.18.1
[29] GenomeInfoDb_1.2.2
[30] BiocInstaller_1.16.1
[31] stringr_0.6.2
[32] IRanges_2.0.0
[33] S4Vectors_0.4.0
[34] BiocGenerics_0.12.0
[35] R.utils_1.34.0
[36] R.oo_1.18.0
[37] R.methodsS3_1.6.1
[38] ggplot2_1.0.0
loaded via a namespace (and not attached):
[1] base64enc_0.1-2 BatchJobs_1.5 BBmisc_1.8
[4] biomaRt_2.22.0 bitops_1.0-6 brew_1.0-6
[7] checkmate_1.5.0 codetools_0.2-9 colorspace_1.2-4
[10] digest_0.6.4 fail_1.2 grid_3.1.1
[13] gtable_0.1.2 hwriter_1.3.2 lattice_0.20-29
[16] latticeExtra_0.6-26 MASS_7.3-35 munsell_0.4.2
[19] proto_0.3-10 RColorBrewer_1.1-2 Rcpp_0.11.3
[22] RCurl_1.95-4.3 reshape2_1.4 scales_0.2.4
[25] sendmailR_1.2-1 tools_3.1.1 xtable_1.7-4
[28] zlibbioc_1.12.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment