FEATURECOUNTS(1)
๐ FEATURECOUNTS ๐
okay bestie, welcome to featureCounts โ it's a User Commands situation, the toolkit for processing next-gen sequencing data. yes, THE one. sit down, hydrate, we're doing this. ๐งโจ
โจ SYNOPSIS โจ
featureCounts [options] -a <annotation_file> -o <output_file>
input_file1 [input_file2] ...
like, that's the whole vibe. args in, counts out. slay. ๐
๐ธ DESCRIPTION ๐ธ
So this is Version 2.0.4 (yes queen, keeping receipts).
๐ Mandatory arguments (aka the non-negotiables)
-a <string>โ the name of your annotation file, bestie. Default flavor is GTF/GFF, but peep the-Foption if you need the tea on other formats. There are also inbuilt annotations (in SAF format!) chilling in theannotationdirectory of the package. Gzipped files? Also accepted. we love a flexible queen. ๐ซถ-o <string>โ the name of your output file that's gonna hold the read counts. And surprise, there's a bonus file too: a separate file with summary statistics of the counting results gets written as<string>.summary. Both files are tab delimited, no cap. โจinput_file1 [input_file2] ...โ a list of SAM or BAM format files. They can be either name sorted or location sorted, whichever. If you provide no files at all,<stdin>input is expected. Oh and heads up: location-sorted paired-end reads get automatically sorted by read names. it's giving considerate. ๐
๐ Optional arguments: the Annotation section
-F <string>โ specify the format of the annotation file you handed over. Acceptable formats are'GTF'(or any compatible GFF format) and'SAF'.'GTF'is the default. For the SAF format deets, go check the Users Guide, iykyk. ๐-t <string>โ specify the feature type(s) in a GTF annotation. If you're giving multiple types, separate them with','and no space in between (she's picky, respect it).'exon'is the default. Rows in the annotation with a matched feature get extracted and used for read mapping.-g <string>โ specify the attribute type in a GTF annotation.'gene_id'is the default. The meta-features used for read counting get extracted from the annotation using whatever value you provide here.--extraAttributesโ pull extra attribute types out of the provided GTF annotation and drop them into your counting output. Important: these attribute types are not used to group features. If you're passing more than one attribute type, separate them with a comma.-A <string>โ hand over a chromosome name alias file so the chr names in your annotation match the ones in your reads. This should be a twocolumn comma-delimited text file. First column = chr names in the annotation, second column = chr names in the reads. Chr names are case sensitive (!!) and no column header should be in the file. periodt. ๐ฅ
๐ซ Level of summarization
-fโ do your read counting at the feature level instead. Like, counting reads for exons rather than genes. main character energy for exons only. ๐
๐ฆ Overlap between reads and features
-Oโ assign reads to all their overlapping meta-features (or features, if you specified-f). generous queen.--minOverlap <int>โ the minimum number of overlapping bases in a read that's required for read assignment. Default is1. For paired end, the number of overlapping bases is counted from both reads. And plot twist: if you provide a negative value, then a gap of up to the specified size is allowed between the read and the feature that the read gets assigned to. ๐--fracOverlap <float>โ the minimum fraction of overlapping bases in a read that's required for read assignment. Value should be in the range[0,1]. Default is0. Overlapping bases are counted from both reads if paired end. Both this option and--minOverlapneed to be satisfied for a read to get assigned โ they're a package deal. ๐ซถ--fracOverlapFeature <float>โ the minimum fraction of overlapping bases in a feature that's required for read assignment. Value should be within range[0,1]. Default is0.--largestOverlapโ assign reads to the meta-feature/feature that has the largest number of overlapping bases. biggest overlap wins, obviously. โจ--nonOverlap <int>โ the maximum number of non-overlapping bases in a read (or a read pair) that's allowed when being assigned to a feature. By default, no limit is set. live freely.--nonOverlapFeature <int>โ the maximum number of non-overlapping bases in a feature that's allowed in read assignment. By default, no limit is set.--readExtension5 <int>โ reads get extended upstream by<int>bases from their 5' end.--readExtension3 <int>โ reads get extended upstream by<int>bases from their 3' end.--read2pos <5:3>โ reduce reads down to their 5' most base or 3' most base. Read counting then happens based on that single base the read got reduced to. minimalism, but make it science. ๐
๐ Multi-mapping reads
-Mโ multi-mapping reads will also be counted. For a multimapping read, all its reported alignments get counted. The'NH'tag in BAM/SAM input is what's used to detect multi-mapping reads.
๐ Fractional counting
--fractionโ assign fractional counts to features. This option must be used together with-Mor-Oor both, no solo missions allowed. When-Mis specified, each reported alignment from a multi-mapping read (identified via the'NH'tag) carries a fractional count of1/xinstead of1(one), wherexis the total number of alignments reported for that same read. When-Ois specified, each overlapping feature receives a fractional count of1/y, whereyis the total number of features overlapping with the read. And when both-Mand-Oare specified, each alignment carries a fractional count of1/(x*y). math ate. ๐งฎโจ
๐ Read filtering
-Q <int>โ the minimum mapping quality score a read must satisfy in order to be counted. For paired-end reads, at least one end should satisfy this criteria. Default is0.--splitOnlyโ count split alignments only, i.e. alignments with a CIGAR string containing'N'. A classic example of split alignments is exon-spanning reads in RNA-seq data.--nonSplitOnlyโ if specified, only non-split alignments (CIGAR strings that do not contain the letter'N') get counted. All the other alignments will be ignored. sorry to them. ๐--primaryโ count primary alignments only. Primary alignments are identified using bit0x100in the SAM/BAM FLAG field.--ignoreDupโ ignore duplicate reads in read counting. Duplicate reads are identified using bitOx400in the BAM/SAM FLAG field. For paired end data, the whole read pair is ignored if one of the reads is a duplicate read. both go down together. ๐ญ
๐ Strandness
-s <int or string>โ perform strand-specific read counting. You provide either a single integer value (applied to all input files) or a string of commaseparated values (applied to each corresponding input file). Possible values include:0(unstranded),1(stranded) and2(reversely stranded). The default value is0, i.e. unstranded read counting carried out for all input files. pick your fighter. ๐
๐ Exon-exon junctions
-Jโ count the number of reads supporting each exon-exon junction. Junctions are identified from all the exon-spanning reads in the input (the ones containing'N'in the CIGAR string). Counting results get saved to a file named<output_file>.jcounts. โจ-G <string>โ provide the name of a FASTA-format file containing the reference sequences used in read mapping that produced the provided SAM/BAM files. This optional argument can be used together with the-Joption to improve read counting for junctions. glow-up for your junctions.
๐ซถ Parameters specific to paired end reads
-pโ if specified, libraries are assumed to contain paired-end reads. For any library that contains paired-end reads, the'countReadPairs'parameter controls whether read pairs or reads get counted.--countReadPairsโ if specified, fragments (or templates) will be counted instead of reads. This option is only applicable for paired-end reads. For single-end data, it is ignored. (not her problem, respectfully.)-Bโ only count read pairs that have both ends aligned. no half-hearted pairs here.-Pโ check the validity of paired-end distance when counting read pairs. Use-dand-Dto set the thresholds.-d <int>โ minimum fragment/template length,50by default.-D <int>โ maximum fragment/template length,600by default.-Cโ do not count read pairs that have their two ends mapping to different chromosomes, or mapping to the same chromosome but on different strands. we're keeping it tidy.--donotsortโ do not sort reads in BAM/SAM input. Note that reads from the same pair are required to be located next to each other in the input. like, required required.
โก Number of CPU threads
-T <int>โ number of threads.1by default. (crank it up, bestie, your machine can handle it ๐ )
๐ Read groups
--byReadGroupโ assign reads by read group. The"RG"tag is required to be present in the input BAM/SAM files. no tag, no service.
๐ง Long reads
-Lโ count long reads such as Nanopore and PacBio reads. Heads up though: long read counting can only run in one thread, and only reads (not read-pairs) can be counted. The good news? There's no limitation on the number of'M'operations allowed in a CIGAR string in long read counting. iconic behavior.
๐ Assignment results for each read
-R <format>โ output detailed assignment results for each read or readpair. Results are saved to a file in one of the following formats:CORE,SAMandBAM. See the Users Guide for more info about these formats.--Rpath <string>โ specify a directory to save the detailed assignment results. If unspecified, the directory where counting results are saved gets used. sensible default, we love her.
๐ธ Miscellaneous
--tmpDir <string>โ the directory under which intermediate files get saved (and later removed, gone but not forgotten). By default, intermediate files are saved to the directory specified in the-oargument.--maxMOp <int>โ the maximum number of'M'operations allowed in a CIGAR string.10by default. Both'X'and'='are treated as'M', and adjacent'M'operations get merged in the CIGAR string. the consolidation era.--verboseโ output verbose information for debugging, like unmatched chromosome/contig names. she tells you everything.-vโ output the version of the program. quick lil flex. โจ
๐ AUTHOR
This manpage was written by Alexandre Mestiashvili for the Debian distribution, and it can be used for any other usage of the program. give them their flowers. ๐
okay and that's the whole page, bestie!! ๐ซถ this doc is featureCounts 2.0.3, dated March 2023 โ go forth and count your features, you absolute icon. mwah. ๐โจ๐
๐ฆ where this page comes from
- debian trixie: subread 2.0.8+dfsg-1 ยท GPL-3.0-or-later
- ubuntu noble: subread 2.0.6+dfsg-2 ยท GPL-3.0-or-later
- ubuntu questing: subread 2.0.8+dfsg-1
- ubuntu resolute: subread 2.0.8+dfsg-1build1 ยท GPL-3.0-or-later
- ubuntu stonking: subread 2.0.8+dfsg-1build1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms