Subread
A ultrafast and accurate read summarization program
Environment
This tool uses the following conda environment:
Channels: - conda-forge - bioconda
Dependencies: - subread
Installation
This tool will be automatically installed when first used:
library(ShennongTools)
# Tool will be installed automatically on first use
result <- sn_run("subread", "featurecounts", ...)
Available Commands
featurecounts
Count reads mapped to genomic features
Basic Usage:
result <- sn_run("subread", "featurecounts",
# Add your parameters here
)
buildindex
Build Subread index from reference genome
Basic Usage:
result <- sn_run("subread", "buildindex",
# Add your parameters here
)
Examples
Featurecounts Example
library(ShennongTools)
result <- sn_run("subread", "featurecounts",
bam_files = "input_file.txt",
annotation = "annotations.gtf",
counts = "results.txt",
threads = 1
)
# Check if successful
if (sn_is_toolcall_success(result)) {
cat("Command completed successfully!\n")
} else {
cat("Command failed. Check logs:\n")
cat(readLines(result@log_file), sep = "\n")
}
Buildindex Example
library(ShennongTools)
result <- sn_run("subread", "buildindex",
fasta = "sequences.fasta",
index = "genome_index"
)
# Check if successful
if (sn_is_toolcall_success(result)) {
cat("Command completed successfully!\n")
} else {
cat("Command failed. Check logs:\n")
cat(readLines(result@log_file), sep = "\n")
}
Parameters Reference
featurecounts Parameters
Inputs:
Parameter | Type | Required | Description |
---|---|---|---|
bam_files |
bam, sam | Yes | Input BAM/SAM files for read counting (space-separated if multiple) |
annotation |
gtf, gff | Yes | Annotation file in GTF/GFF format |
Outputs:
Parameter | Type | Required | Description |
---|---|---|---|
counts |
txt | Yes | Output count matrix file |
Parameters:
Parameter | Type | Default | Description |
---|---|---|---|
feature_type |
string | “exon” | Feature type in GTF annotation |
attribute_type |
string | “gene_id” | Attribute type in GTF annotation |
stranded |
integer | 0 | Strand-specific read counting (0: unstranded, 1: stranded, 2: reversely stranded) |
paired |
boolean | TRUE | Treat input as paired-end reads |
threads |
integer | 1 | Number of threads to use |