Tool Command Parameters¶
Configuration reference for DNBelab C Series HT tool commands
GTF File Operations (mkgtf) ¶
Core Function A GTF file operation tool for gene type statistics, rule-based filtering, and format validation. It provides standardized gene annotation data for single-cell analysis.
Usage ¶
$ dnbc4tools tools mkgtf
dnbc4tools 3.1
Filter and process GTF annotation files.
Usage: dnbc4tools tools mkgtf [OPTIONS]
optional arguments:
--help show this help message and exit
Basic Settings:
--action <STR> Operation type: 'mkgtf' (filter by gene types), 'stats' (count statistics), 'check' (validate format) [default: mkgtf] (e.g., `stats`).
--ingtf <FILE> Path to input GTF annotation file (required) (e.g., `genes.gtf`).
--output <FILE> Path to output file. Required for "mkgtf" and "check" actions. If not provided for "stats" action, statistics will be printed to stdout.
Analysis Settings:
--include <STR> Comma-separated list of gene types to include. Supports wildcards (e.g., 'IG_*' will match 'IG_V_gene', 'IG_C_gene'). [default: protein_coding,lncRNA,lincRNA,antisense,IG_*,TR_*].
--type <STR> Attribute name for gene type classification (e.g., gene_biotype, gene_type). Use 'auto' to automatically detect. [default: auto].
--feature <STR> Feature type to process from GTF. Use 'transcript' if no 'gene' entries exist [default: gene].
Usage Examples:
Statistics: dnbc4tools tools mkgtf --action stats --ingtf genes.gtf
Filtering: dnbc4tools tools mkgtf --ingtf genes.gtf --output filtered.gtf --include 'protein_coding,lncRNA'
Validation: dnbc4tools tools mkgtf --action check --ingtf genes.gtf --output corrected.gtf
Parameter Description¶
Required Parameters¶
--ingtf (Required)¶
Specify the path to the input GTF gene annotation file.
- Format Requirement: Standard GTF format. GFF or GFF3 formats are not supported.
Default: None
Example:
--ingtf Homo_sapiens.GRCh38.108.gtf
--output (Required)¶
Specify the output file for the processing results.
- Function: Generates different types of output files depending on the operation mode.
- Conditional Requirement: Required when
--action mkgtfor--action checkis used; optional when--action statsis used (statistics will be printed to stdout). - Auto-creation: The specified output directory will be created automatically if it does not exist.
Default: None
Examples:
# When action is 'mkgtf' (filter)
--output ./filtered_genes.gtf
# When action is 'stats' (statistics)
--output ./gene_statistics.txt
# When action is 'check' (validation)
--output ./corrected.gtf
Optional Parameters¶
--action (Optional)¶
Select the type of operation to perform.
mkgtf: (Default) Filter the GTF file based on gene types.stats: Count the gene types in the GTF file.check: Validate and fix the GTF file format.
Default: mkgtf
Example:
--action stats
--include (Optional)¶
In mkgtf mode, specify the gene types to keep, separated by commas.
- Function: Used to precisely filter for the gene sets you are interested in.
- Wildcard Support: Supports wildcard matching (e.g.,
IG_*can matchIG_V_gene,IG_C_gene).
Default: protein_coding,lncRNA,lincRNA,antisense,IG_*,TR_*
Example:
--include protein_coding,lncRNA
--type (Optional)¶
Specify the tag in the GTF attributes used to identify the gene type.
- Function: Adapts to the annotation style of GTF files from different sources.
- Auto-detection: If set to
auto, the program automatically detects common tags (such asgene_biotypeandgene_type).
Default: auto
Example:
--type gene_type
--feature (Optional)¶
Specify from which column (feature) of the GTF file to extract information.
- Function: Typically used to specify whether the operation is at the gene or transcript level.
- Alternative: If there are no `gene` rows in the GTF file, it is recommended to select `transcript`.
Default: gene
Example:
--feature transcript
Usage Examples
- Count gene types
dnbc4tools tools mkgtf --action stats --ingtf genes.gtf
- Filter gene types
dnbc4tools tools mkgtf --action mkgtf --ingtf genes.gtf --output genes.filter.gtf
- Validate and fix GTF file
dnbc4tools tools mkgtf --action check --ingtf genes.gtf --output corrected.gtf
BAM to FASTQ (bam2fastq) ¶
Professional Conversion Tool A BAM-to-FASTQ conversion tool for C4 RNA BAM files. It supports multi-threaded processing and configurable output splitting.
Usage ¶
$ bam2fastq --help
BAM to FASTQ Converter for C4 Single Cell RNA seq Data
Usage: bam2fastq [OPTIONS] <BAM> <OUTPUT>
Arguments:
<BAM> Path to the input BAM file
<OUTPUT> Directory where FASTQ files will be written
Options:
--threads <THREADS> Number of CPU threads for parallel processing (default: all available cores) [default: 8]
--locus <REGION> Process reads from a specific genomic region (format: chr1:1000-2000)
--reads-per-fastq <READS> Maximum number of reads per FASTQ file. All reads go to a single file if not specified.
--max-memory <MEMORY> Maximum memory to use in MB. Auto-determined if not specified.
--no-compress Disable gzip compression for output FASTQ files
--help Print help
--version Print version
Parameter Description¶
Required Parameters¶
<BAM> (Required)¶
Specify the path to the input BAM file.
- Format Requirement: Must be a valid C4 RNA BAM file, supporting both single-end and paired-end data.
- Index Requirement: The BAM file must be indexed (i.e., a corresponding .bai file must exist alongside it).
- Paired-end Note: If it is paired-end data, you need to sort it by read name using
samtools sort -nbefore processing.
Default: None
Example:
/path/to/your.bam
<OUTPUT> (Required)¶
Specify the directory for the output FASTQ files.
- Function: All converted FASTQ files will be saved in this directory.
- Auto-creation: The directory will be created automatically if it does not exist.
Default: None
Example:
/path/to/output_dir
Optional Parameters¶
--threads (Optional)¶
Set the number of CPU threads for parallel processing.
- Performance Note: Increasing thread count usually improves BAM decoding and writing performance, but actual gain is limited by disk I/O bandwidth.
- Recommendation: The default is
all available CPU cores; increase it on high-I/O systems, and use a conservative value on HDD-based systems.
Default: all available CPU cores
Example:
--threads 8
--locus (Optional)¶
Process only reads from a specific genomic region.
- Format: Standard genomic coordinate format (
chromosome:start-end). - Application: For targeted analysis of specific genes or chromosomal regions.
Default: None
Example:
--locus chr1:1000-2000
--reads-per-fastq (Optional)¶
Set the maximum number of reads per output FASTQ file.
- Splitting Strategy: Automatically splits large files into smaller ones for easier downstream processing.
- Default Behavior: If not specified, all reads will be written to a single file.
Default: None
Example:
--reads-per-fastq 10000000
--max-memory <MEMORY> (Optional)¶
Set the maximum memory the tool can use (in MB).
- Function: Controls the tool's memory consumption to prevent failures due to insufficient memory.
- Auto-determination: If not specified, the tool will automatically allocate memory based on available system resources.
Default: Auto-determined
Example:
--max-memory 8192
--no-compress (Flag)¶
Disable gzip compression for output FASTQ files to improve writing speed.
- Performance Bottleneck: The main speed bottleneck of the program is writing compressed files.
- Note: Thanks to parallel accelerated compression, default compressed output performance has been improved, reducing the impact of compression on runtime.
Default: Not set
Usage Examples
- Basic conversion
bam2fastq input.bam ./output_dir
- High-speed multi-threaded conversion
bam2fastq --threads 8 input.bam ./output_dir
- Region-specific conversion
bam2fastq --locus chr1:1000000-2000000 --threads 4 input.bam ./output_dir
- Large file splitting conversion
bam2fastq --reads-per-fastq 5000000 --threads 4 input.bam ./output_dir
Chromosome Splitting (chromsplit) ¶
Core Function A professional genome sequence splitting tool that intelligently identifies split points to maintain gene annotation integrity. It is primarily used in ATAC library construction to ensure chromosome lengths do not exceed the 2^29-1 limit.
Usage¶
$ chromsplit --help
Split large genome sequences into smaller fragments at N-stretches or intergenic regions
Usage: chromsplit [OPTIONS] --fasta <FA> --prefix <PREFIX>
Options:
--fasta <FA> Input genome sequence file in FASTA format
--gtf <GTF> Optional GTF/GFF annotation file for the genome
--prefix <PREFIX> Prefix for output files (.fa and .cutsite.tsv will be appended)
--min_length <MIN_LENGTH> Minimum length of output scaffold fragments (in base pairs) [default: 300000000]
--max_length <MAX_LENGTH> Maximum length of output scaffold fragments (in base pairs) [default: 500000000]
--cut_site <CUT_SITE> Optional cut site file containing predefined split positions
--help Print help (see more with '--help')
--version Print version
Parameter Description¶
Required Parameters¶
--fasta <FA> (Required)¶
Specify the input genome sequence file.
- Format Requirement: Standard FASTA format (.fa, .fasta, .fna).
- Content: Must contain complete chromosome or scaffold sequences.
Default: None
Example:
--fasta genome.fasta
--prefix <PREFIX> (Required)¶
Specify the prefix for the output files.
- Output Files: The tool will automatically generate files like
<prefix>.fa,<prefix>.cutsite.tsv, etc. - File Management: Facilitates batch processing and result tracking.
Default: None
Example:
--prefix split_genome
Optional Parameters¶
--gtf <GTF> (Optional)¶
Specify the gene annotation file (GTF/GFF format).
- Intelligent Splitting: Providing an annotation file ensures that split points are located in intergenic regions, protecting gene integrity.
- Annotation Sync: The tool automatically adjusts and outputs a new annotation file with synchronized coordinates.
Default: None
Example:
--gtf annotation.gtf
--min_length <MIN_LENGTH> (Optional)¶
Set the minimum length of the output fragments (unit: bp).
- Function: Ensures that the split fragments are not too small, which could affect subsequent analysis.
Default: 300000000
Example:
--min_length 300000000
--max_length <MAX_LENGTH> (Optional)¶
Set the maximum length of the output fragments (unit: bp).
- Technical Limitation: Primarily used to ensure fragment length meets requirements for downstream analyses like ATAC library construction (usually < 2^29-1 bp).
Default: 500000000
Example:
--max_length 500000000
--cut_site <CUT_SITE> (Optional)¶
Provide a text file containing predefined split positions.
- Precise Control: Prioritizes splitting at the specified positions in the file, allowing for precise control over split locations.
Default: None
Example:
--cut_site predefined_cuts.txt
Usage Examples
- Basic splitting
chromsplit --fasta genome.fasta --prefix split_result
- Intelligent splitting with annotation file
chromsplit --fasta genome.fasta --gtf annotation.gtf --prefix split_genome
- Custom length splitting
chromsplit --fasta genome.fasta --prefix custom_split --min_length 300000000 --max_length 500000000
- Using predefined split positions
chromsplit --fasta genome.fasta --gtf annotation.gtf --prefix precise_split --cut_site custom_cuts.txt
FASTQ Subsetting (fqsubC4) ¶
Core Function A FASTQ region extraction tool for clipping sequence positions. It can be used to normalize sequence structures across sequencing batches.
Usage¶
$ fqsubC4 --help
Extracts regions from FASTQ sequences
Usage: fqsubC4 [OPTIONS] --input <FILE> --output <FILE> --regions <REGIONS>
Options:
--input <FILE> Path to input FASTQ file (supports both uncompressed and gzipped formats)
--output <FILE> Path to output FASTQ file (output will be automatically compressed if filename ends with .gz)
--regions <REGIONS> Comma-separated regions in format start:end (e.g., 7:16,23:32,38:47)
--threads <THREADS> Number of threads to use for parallel processing [default: 8]
--help Print help (see more with '--help')
--version Print version
Parameter Description¶
Required Parameters¶
--input <FILE> (Required)¶
Specify the path to the input FASTQ file.
- Format Support: Supports both uncompressed (.fq, .fastq) and gzipped (.fq.gz, .fastq.gz) formats.
- Auto-detection: The tool automatically determines the compression format based on the file extension.
Default: None
Example:
--input sample_R1.fastq.gz
--output <FILE> (Required)¶
Specify the path for the output FASTQ file.
- Auto-compression: The output file will be automatically compressed if the filename ends with
.gz. - Recommendation: Compressed output is recommended to effectively reduce disk I/O and storage usage.
Default: None
Example:
--output extracted_R1.fastq.gz
--regions <REGIONS> (Required)¶
Specify the regions to be extracted from the sequences.
- Format Specification: Use
start:endformat, with multiple regions separated by commas. - Coordinate System: Coordinates are 1-based (the first base of the sequence is position 1).
- Application: Used for extracting Barcodes, UMIs, or for trimming sequences.
Default: None
Example:
--regions 7:16,23:32,38:47
Optional Parameters¶
--threads <THREADS> (Optional)¶
Set the number of threads for parallel processing.
- Function: Improves parallelism in read, extraction, and write stages for faster processing of large files.
- Recommendation: The default is
all available CPU cores; adjust according to CPU cores and disk I/O performance.
Default: all available CPU cores
Example:
--threads 8
Usage Example
- Basic region extraction
fqsubC4 --input sample.fastq.gz --output extracted.fastq.gz --regions "7:16,23:32"
Related Documentation¶
| Resource | Description |
|---|---|
| Tools Overview | Overview of all tool parameters |
| Outputs | Detailed output file interpretation |
| Pipelines | Analysis workflow guides |
Feedback & Support
This document is continuously maintained. If you identify errors or additional information is required, please submit feedback via GitHub Issues.
Document Version: 3.1 | Last Updated: May 15, 2026