1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
| htseq-count -h usage: htseq-count [options] alignment_file gff_file
This script takes one or more alignment files in SAM/BAM format and a feature file in GFF format and calculates for each feature the number of reads mapping to it. See http://htseq.readthedocs.io/en/master/count.html for details.
positional arguments: samfilenames Path to the SAM/BAM files containing the mapped reads. If '-' is selected, read from standard input featuresfilename Path to the GTF file containing the features
optional arguments: -h, --help show this help message and exit -f {sam,bam,auto}, --format {sam,bam,auto} Type of <alignment_file> data. DEPRECATED: file format is detected automatically. This option is ignored. -r {pos,name}, --order {pos,name} 'pos' or 'name'. Sorting order of <alignment_file> (default: name). Paired-end sequencing data must be sorted either by position or by read name, and the sorting order must be specified. Ignored for single- end data. --max-reads-in-buffer MAX_BUFFER_SIZE When <alignment_file> is paired end sorted by position, allow only so many reads to stay in memory until the mates are found (raising this number will use more memory). Has no effect for single end or paired end sorted by name -s {yes,no,reverse}, --stranded {yes,no,reverse} Whether the data is from a strand-specific assay. Specify 'yes', 'no', or 'reverse' (default: yes). 'reverse' means 'yes' with reversed strand interpretation -a MINAQUAL, --minaqual MINAQUAL Skip all reads with MAPQ alignment quality lower than the given minimum value (default: 10). MAPQ is the 5th column of a SAM/BAM file and its usage depends on the software used to map the reads. -t FEATURETYPE, --type FEATURETYPE Feature type (3rd column in GTF file) to be used, all features of other type are ignored (default, suitable for Ensembl GTF files: exon) -i IDATTR, --idattr IDATTR GTF attribute to be used as feature ID (default, suitable for Ensembl GTF files: gene_id). All feature of the right type (see -t option) within the same GTF attribute will be added together. The typical way of using this option is to count all exonic reads from each gene and add the exons but other uses are possible as well. --additional-attr ADDITIONAL_ATTR Additional feature attributes (default: none, suitable for Ensembl GTF files: gene_name). Use multiple times for more than one additional attribute. These attributes are only used as annotations in the output, while the determination of how the counts are added together is done based on option -i. -m {union,intersection-strict,intersection-nonempty}, --mode {union,intersection-strict,intersection-nonempty} Mode to handle reads overlapping more than one feature (choices: union, intersection-strict, intersection- nonempty; default: union) --nonunique {none,all,fraction,random} Whether and how to score reads that are not uniquely aligned or ambiguously assigned to features (choices: none, all, fraction, random; default: none) --secondary-alignments {score,ignore} Whether to score secondary alignments (0x100 flag) --supplementary-alignments {score,ignore} Whether to score supplementary alignments (0x800 flag) -o SAMOUTS, --samout SAMOUTS Write out all SAM alignment records into SAM/BAM files (one per input file needed), annotating each line with its feature assignment (as an optional field with tag 'XF'). See the -p option to use BAM instead of SAM. -p {SAM,BAM,sam,bam}, --samout-format {SAM,BAM,sam,bam} Format to use with the --samout option. -d OUTPUT_DELIMITER, --delimiter OUTPUT_DELIMITER Column delimiter in output (default: TAB). -c OUTPUT_FILENAME, --counts_output OUTPUT_FILENAME Filename to output the counts to instead of stdout. --append-output Append counts output. This option is useful if you have already creates a TSV/CSV/similar file with a header for your samples (with additional columns for the feature name and any additionl attributes) and want to fill in the rest of the file. -n NPROCESSES, --nprocesses NPROCESSES Number of parallel CPU processes to use (default: 1). --feature-query FEATURE_QUERY Restrict to features descibed in this expression. Currently supports a single kind of expression: attribute == "one attr" to restrict the GFF to a single gene or transcript, e.g. --feature-query 'gene_name == "ACTB"' - notice the single quotes around the argument of this option and the double quotes around the gene name. Broader queries might become available in the future. -q, --quiet Suppress progress report --version Show software version and exit
|