🧬 核心功能
GTF 文件全面操作工具,支持基因类型统计、智能过滤和文件格式校验。为单细胞分析提供高质量、标准化的基因注释数据。
$ dnbc4tools tools mkgtf -h
optional arguments:
-h, --help show this help message and exit
Basic Settings:
--action <STR> Select action type: 'mkgtf'(filter), 'stat'(statistics) or 'check'(validation) [default: mkgtf]
--ingtf <FILE> Path to input GTF annotation file
--output <FILE> Path to output file
Filter Settings:
GTF file format requirements:
RNA analysis requires "gene"/"transcript" and "exon" types, plus gene_id/name and transcript_id/name attributes.
--include <STR> Set filter parameters in 'mkgtf' mode, multiple filters separated by commas. Default includes: protein_coding, lncRNA, lincRNA, antisense, IG_*/TR_* genes
--type <STR> Set according to gene type tag in GTF attributes [default: gene_biotype]
--feature <STR> Select information from feature column. If no 'gene' rows, select 'transcript' [default: gene]
--ingtf (必需)指定输入的GTF基因注释文件路径。
默认值: 无
示例:
--ingtf Homo_sapiens.GRCh38.108.gtf
--output (必需)指定处理结果的输出文件。
默认值: 无
示例:
# 当 action 为 'mkgtf' (过滤)
--output ./filtered_genes.gtf
# 当 action 为 'stat' (统计)
--output ./gene_statistics.txt
# 当 action 为 'check' (校验)
--output ./corrected.gtf
--action (可选)选择要执行的操作类型。
mkgtf: (默认) 根据基因类型过滤GTF文件。stat: 统计GTF文件中的基因类型。check: 校验并修复GTF文件格式。默认值: mkgtf
示例:
--action stat
--include (可选)在 mkgtf 模式下,指定要保留的基因类型,多个类型以逗号分隔。
默认值: protein_coding,lncRNA,lincRNA,antisense,IG_*,TR_*
示例:
--include protein_coding,lncRNA
--type (可选)指定GTF属性中用于标识基因类型的标签。
默认值: gene_biotype
示例:
--type gene_type
--feature (可选)指定从GTF文件的哪一列(feature)提取信息。
默认值: gene
示例:
--feature transcript
Note
dnbc4tools tools mkgtf --action stat --ingtf genes.gtf --output gtfstat.txt --type gene_biotype
dnbc4tools tools mkgtf --action mkgtf --ingtf genes.gtf --output genes.filter.gtf --type gene_biotype
dnbc4tools tools mkgtf --action check --ingtf genes.gtf --output corrected.gtf
📄 专业转换工具
高效的 BAM 文件操作工具,专用于将 C4 RNA BAM 文件转换成 FASTQ 文件。支持多线程并行处理和灵活的输出配置。
$ 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:
-t, --threads <THREADS> Number of CPU threads for parallel processing [default: 4]
-r, --locus <REGION> Process reads from a specific genomic region (format: chr1:1000-2000)
-n, --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. If not specified, will be automatically determined based on system resources.
--no-compress Disable gzip compression for output FASTQ files
-h, --help Print help
-V, --version Print version
<BAM> (必需)指定输入的BAM文件路径。
samtools sort -n 根据序列名排序后再进行处理。默认值: 无
示例:
/path/to/your.bam
<OUTPUT> (必需)指定输出FASTQ文件的目录。
默认值: 无
示例:
/path/to/output_dir
-t, --threads (可选)设置用于并行处理的CPU线程数。
默认值: 4
示例:
-t 4
-r, --locus (可选)仅处理来自特定基因组区域的读段。
染色体:起始-结束)。默认值: 无
示例:
-r chr1:1000-2000
-n, --reads-per-fastq (可选)设置每个输出FASTQ文件的最大读段数量。
默认值: 无
示例:
-n 10000000
--max-memory <MEMORY> (可选)设定工具可使用的最大内存(单位:MB)。
默认值: 自动确定
示例:
--max-memory 8192
--no-compress (标志)禁用对输出FASTQ文件的gzip压缩,以显著提高分析速度。
默认值: 不设置
Note
bam2fastq input.bam ./output_dir --no-compress
bam2fastq -t 8 input.bam ./output_dir --no-compress
bam2fastq -r chr1:1000000-2000000 -t 4 input.bam ./output_dir --no-compress
bam2fastq -n 5000000 -t 4 input.bam ./output_dir --no-compress
🧬 核心功能
专业的基因组序列分割工具,智能识别分割位点以维护基因注释完整性。主要用于 ATAC 建库时控制染色体长度不超过 2^29-1 的限制要求。
$ chromsplit --help
Usage: chromsplit [OPTIONS] --fasta <FA> --prefix <PREFIX>
Options:
-f, --fasta <FA> Input genome sequence file in FASTA format
-g, --gtf <GTF> Optional GTF/GFF annotation file for the genome
-o, --prefix <PREFIX> Prefix for output files
--min_length <MIN_LENGTH> Minimum length of output scaffold fragments [default: 300000000]
--max_length <MAX_LENGTH> Maximum length of output scaffold fragments [default: 500000000]
--cut_site <CUT_SITE> Optional cut site file containing predefined split positions
-h, --help Print help
-V, --version Print version
-f, --fasta <FA> (必需)指定输入的基因组序列文件。
默认值: 无
示例:
--fasta genome.fasta
-o, --prefix <PREFIX> (必需)指定输出文件的前缀。
<prefix>.fa, <prefix>.cutsite.tsv 等文件。默认值: 无
示例:
--prefix split_genome
-g, --gtf <GTF> (可选)指定基因注释文件(GTF/GFF格式)。
默认值: 无
示例:
--gtf annotation.gtf
--min_length <MIN_LENGTH> (可选)设置输出片段的最小长度(单位:bp)。
默认值: 300000000
示例:
--min_length 300000000
--max_length <MAX_LENGTH> (可选)设置输出片段的最大长度(单位:bp)。
默认值: 500000000
示例:
--max_length 500000000
--cut_site <CUT_SITE> (可选)提供一个包含预定义分割位置的文本文件。
默认值: 无
示例:
--cut_site predefined_cuts.txt
Note
chromsplit --fasta genome.fasta --prefix split_result
chromsplit --fasta genome.fasta --gtf annotation.gtf --prefix split_genome
chromsplit --fasta genome.fasta --prefix custom_split --min_length 300000000 --max_length 500000000
chromsplit --fasta genome.fasta --gtf annotation.gtf --prefix precise_split --cut_site custom_cuts.txt
📝 核心功能
专业的 FASTQ 序列区域提取工具,支持精确的序列位置截取。主要用于解决多次加测数据格式不一致问题,确保 C4 测序数据的标准化处理。
$ fqsubC4 --help
Usage: fqsubC4 [OPTIONS] --input <FILE> --output <FILE> --regions <REGIONS>
Options:
-i, --input <FILE> Path to input FASTQ file
-o, --output <FILE> Path to output FASTQ file
-r, --regions <REGIONS> Comma-separated regions in format start:end (e.g., 7:16,23:32,38:47)
-b, --batch-size <BATCH_SIZE> Batch size for processing [default: 100000]
--buffer-size <BUFFER_SIZE> Buffer size for channel between reader and writer [default: 500]
-h, --help Print help
-V, --version Print version
-i, --input <FILE> (必需)指定输入的FASTQ文件路径。
默认值: 无
示例:
--input sample_R1.fastq.gz
-o, --output <FILE> (必需)指定输出的FASTQ文件路径。
.gz 结尾,输出文件将被自动压缩。默认值: 无
示例:
--output extracted_R1.fastq.gz
-r, --regions <REGIONS> (必需)指定要从序列中提取的区域。
start:end 格式,多个区域用逗号分隔。默认值: 无
示例:
--regions 7:16,23:32,38:47
-b, --batch-size <BATCH_SIZE> (可选)设置单次批处理的记录数量(即一次性读入内存的FASTQ记录数)。
默认值: 100000
示例:
--batch-size 200000
--buffer-size <BUFFER_SIZE> (可选)设置读取器和写入器之间通道的缓冲区大小。
默认值: 500
示例:
--buffer-size 1000
Note
fqsubC4 --input sample.fastq.gz --output extracted.fastq --regions "7:16,23:32"
💡 提示
本文档持续更新中,如发现内容错误或需要补充的信息,欢迎反馈。
📝 文档版本: 3.0 beta | 最后更新: 2025年
🛠️ DNBelab C Series HT Tool-based Analysis Parameters
高性能单细胞数据分析工具参数配置指南