Summarizes read counts from multiple BAM/SAM files in parallel using feature annotations.
Summarization(
NodesSum,
Xsum,
UploadPathSum,
DownloadPathSum,
annot.ext,
isGTFAnnotationFile,
GTF.featureType,
GTF.attrType,
useMetaFeatures,
allowMultiOverlap,
minOverlap,
fracOverlap,
fracOverlapFeature,
largestOverlap,
countMultiMappingReads,
fraction,
minMQS,
primaryOnly,
ignoreDup,
strandSpecific,
requireBothEndsMapped,
checkFragLength,
minFragLength,
maxFragLength,
countChimericFragments,
autosort,
nthreads,
tmpDir,
verbose
)
Writes files to DownloadPathSum
.
Integer. Number of parallel R nodes (e.g., CPU cores) to spawn.
Character vector. Filenames of BAM or SAM files to process.
Character. Directory containing the raw input files.
Character. Directory into which all output files will be written.
Character. Path to an external annotation file (e.g., GTF/GFF).
Logical. Should annot.ext
be treated as a GTF file?
Character. Feature type (e.g., "exon").
Character. GTF attribute (e.g., "gene_id").
Logical. Collapse sub-features into meta-features before counting.
Logical. Allow reads overlapping multiple features to be counted.
Integer. Minimum number of overlapping bases to assign a read.
Numeric. Minimum fraction of read that must overlap a feature.
Numeric. Minimum fraction of feature that must be covered by a read.
Logical. When overlapping multiple features, assign based on largest overlap.
Logical. Count reads that map to multiple locations.
Logical. Distribute counts fractionally for multi-mapping reads.
Integer. Minimum mapping quality score for reads to be counted.
Logical. Count only the primary alignments of multi-mapping reads.
Logical. Exclude PCR duplicates from counting.
Integer. Strand-specific counting mode (0 = unstranded, 1 = stranded, 2 = reversely stranded).
Logical. In paired-end mode, require both mates to map.
Logical. Enforce fragment length checks on paired-end reads.
Numeric. Minimum fragment length to keep.
Numeric. Maximum fragment length to keep.
Logical. Count discordant or chimeric read pairs.
Logical. Automatically sort input files if not already sorted.
Integer. Number of threads per featureCounts call.
Character. Directory for temporary files (e.g., large intermediate files).
Logical. Print verbose messages during execution.
This function run Rsubread::featureCounts()
on each input file,
capturing count statistics, annotation data, and per-sample summary logs. Results are
written to the specified output directory.
A socket cluster of NodesSum
workers is created.
Each worker invokes featureCounts()
on one sample, using the annotation and counting parameters.
Outputs per sample:
A text summary (*_summary.txt
) capturing the console output.
A CSV of count statistics (*_stat.csv
).
A CSV of feature annotations (*_annotation.csv
).
A tab-delimited count matrix saved under Counts/<sample>.tab
.
The cluster is terminated once all samples complete.