featurecounts
Read counting
Genomic features
Description
featureCounts is a read summarization program for counting reads generated from either RNA or genomic DNA sequencing experiments by implementing highly efficient chromosome hashing and feature blocking techniques. It works with either single or paired-end reads and provides a wide range of options appropriate for different sequencing applications.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--annotation -a | file required | Name of an annotation file. GTF/GFF format by default. See '--format' option for more format information. |
--input -i | file required multiple | A list of SAM or BAM format files separated by semi-colon (;). They can be either name or location sorted. Location-sorted paired-end reads are automatically sorted by read names. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--counts -o | file required output | Name of output file including read counts in tab delimited format. |
--summary | file output | Summary statistics of counting results in tab delimited format. |
--junctions | file output | Count number of reads supporting each exon-exon junction. Junctions were identified from those exon-spanning reads in the input (containing 'N' in CIGAR string). |
Annotation
Name | Type & Properties | Description |
|---|---|---|
--format -F | string | Specify format of the provided annotation file. Acceptable formats include 'GTF' (or compatible GFF format) and 'SAF'. 'GTF' by default. |
--feature_type -t | string multiple | Specify feature type(s) in a GTF annotation. If multiple types are provided, they should be separated by ';' with no space in between. 'exon' by default. Rows in the annotation with a matched feature will be extracted and used for read mapping. |
--attribute_type -g | string | Specify attribute type in GTF annotation. 'gene_id' by default. Meta-features used for read counting will be extracted from annotation using the provided value. |
--extra_attributes | string multiple | Extract extra attribute types from the provided GTF annotation and include them in the counting output. These attribute types will not be used to group features. If more than one attribute type is provided they should be separated by semicolon (;). |
--chrom_alias -A | file | Provide a chromosome name alias file to match chr names in annotation with those in the reads. This should be a two-column comma-delimited text file. Its first column should include chr names in the annotation and its second column should include chr names in the reads. Chr names are case sensitive. No column header should be included in the file. |
Level of summarization
Name | Type & Properties | Description |
|---|---|---|
--feature_level -f | boolean_true | Perform read counting at feature level (eg. counting reads for exons rather than genes). |
Overlap between reads and features
Name | Type & Properties | Description |
|---|---|---|
--overlapping -O | boolean_true | Assign reads to all their overlapping meta-features (or features if '--feature_level' is specified). |
--min_overlap | integer | Minimum number of overlapping bases in a read that is required for read assignment. 1 by default. Number of overlapping bases is counted from both reads if paired end. If a negative value is provided, then a gap of up to specified size will be allowed between read and the feature that the read is assigned to. |
--frac_overlap | double | Minimum fraction of overlapping bases in a read that is required for read assignment. Value should be within range [0,1]. 0 by default. Number of overlapping bases is counted from both reads if paired end. Both this option and '--min_overlap' option need to be satisfied for read assignment. |
--frac_overlap_feature | double | Minimum fraction of overlapping bases in a feature that is required for read assignment. Value should be within range [0,1]. 0 by default. |
--largest_overlap | boolean_true | Assign reads to a meta-feature/feature that has the largest number of overlapping bases. |
--non_overlap | integer | Maximum number of non-overlapping bases in a read (or a read pair) that is allowed when being assigned to a feature. No limit is set by default. |
--non_overlap_feature | integer | Maximum number of non-overlapping bases in a feature that is allowed in read assignment. No limit is set by default. |
--read_extension5 | integer | Reads are extended upstream by <int> bases from their 5' end. |
--read_extension3 | integer | Reads are extended upstream by <int> bases from their 3' end. |
--read2pos | integer | Reduce reads to their 5' most base or 3' most base. Read counting is then performed based on the single base the read is reduced to. |
Multi-mapping reads
Name | Type & Properties | Description |
|---|---|---|
--multi_mapping -M | boolean_true | Multi-mapping reads will also be counted. For a multi-mapping read, all its reported alignments will be counted. The 'NH' tag in BAM/SAM input is used to detect multi-mapping reads. |
Fractional counting
Name | Type & Properties | Description |
|---|---|---|
--fraction | boolean_true | Assign fractional counts to features. This option must be used together with '--multi_mapping' or '--overlapping' or both. When '--multi_mapping' is specified, each reported alignment from a multi-mapping read (identified via 'NH' tag) will carry a fractional count of 1/x, instead of 1 (one), where x is the total number of alignments reported for the same read. When '--overlapping' is specified, each overlapping feature will receive a fractional count of 1/y, where y is the total number of features overlapping with the read. When both '--multi_mapping' and '--overlapping' are specified, each alignment will carry a fractional count of 1/(x*y). |
Read filtering
Name | Type & Properties | Description |
|---|---|---|
--min_map_quality -Q | integer | 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. 0 by default. |
--split_only | boolean_true | Count split alignments only (ie. alignments with CIGAR string containing 'N'). An example of split alignments is exon-spanning reads in RNA-seq data. |
--non_split_only | boolean_true | If specified, only non-split alignments (CIGAR strings do not contain letter 'N') will be counted. All the other alignments will be ignored. |
--primary | boolean_true | Count primary alignments only. Primary alignments are identified using bit 0x100 in SAM/BAM FLAG field. |
--ignore_dup | boolean_true | Ignore duplicate reads in read counting. Duplicate reads are identified using bit Ox400 in BAM/SAM FLAG field. The whole read pair is ignored if one of the reads is a duplicate read for paired end data. |
Strandedness
Name | Type & Properties | Description |
|---|---|---|
--strand -s | integer | Perform strand-specific read counting. A single integer value (applied to all input files) should be provided. Possible values include: 0 (unstranded), 1 (stranded) and 2 (reversely stranded). Default value is 0 (ie. unstranded read counting carried out for all input files). |
Exon-exon junctions
Name | Type & Properties | Description |
|---|---|---|
--ref_fasta -G | file | Provide the name of a FASTA-format file that contains the reference sequences used in read mapping that produced the provided SAM/BAM files. |
Parameters specific to paired end reads
Name | Type & Properties | Description |
|---|---|---|
--paired -p | boolean_true | Specify that input data contain paired-end reads. To perform fragment counting (ie. counting read pairs), the '--countReadPairs' parameter should also be specified in addition to this parameter. |
--count_read_pairs | boolean_true | Count read pairs (fragments) instead of reads. This option is only applicable for paired-end reads. |
--both_aligned -B | boolean_true | Count read pairs (fragments) instead of reads. This option is only applicable for paired-end reads. |
--check_pe_dist -P | boolean_true | Check validity of paired-end distance when counting read pairs. Use '--min_length' and '--max_length' to set thresholds. |
--min_length -d | integer | Minimum fragment/template length, 50 by default. |
--max_length -D | integer | Maximum fragment/template length, 600 by default. |
--same_strand -C | boolean_true | Do not count read pairs that have their two ends mapping to different chromosomes or mapping to same chromosome but on different strands. |
--donotsort | boolean_true | 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. |
Read groups
Name | Type & Properties | Description |
|---|---|---|
--by_read_group | boolean_true | Assign reads by read group. "RG" tag is required to be present in the input BAM/SAM files. |
Long reads
Name | Type & Properties | Description |
|---|---|---|
--long_reads | boolean_true | Count long reads such as Nanopore and PacBio reads. Long read counting can only run in one thread and only reads (not read-pairs) can be counted. There is no limitation on the number of 'M' operations allowed in a CIGAR string in long read counting. |
Assignment results for each read
Name | Type & Properties | Description |
|---|---|---|
--detailed_results | file output | Directory to save the detailed assignment results. Use `--detailed_results_format` to determine the format of the detailed results. |
--detailed_results_format -R | string | Output detailed assignment results for each read or read-pair. Results are saved to a file that is in one of the following formats: CORE, SAM and BAM. See documentaiton for more info about these formats. |
Miscellaneous
Name | Type & Properties | Description |
|---|---|---|
--max_M_op | integer | Maximum number of 'M' operations allowed in a CIGAR string. 10 by default. Both 'X' and '=' are treated as 'M' and adjacent 'M' operations are merged in the CIGAR string. |
--verbose | boolean_true | Output verbose information for debugging, such as un-matched chromosome/contig names. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
counts: "$id.$key.counts.tsv"
summary: "$id.$key.summary.tsv"
junctions: "$id.$key.junctions.txt"
detailed_results: "$id.$key.detailed_results.detailed_results"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/biobox.git \
-revision v0.2.0 \
-main-script target/nextflow/featurecounts/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
featurecountsbiobox v0.2.0
Uses
0 relationships
No component dependencies found.