Skip to content

Commit b713a8e

Browse files
committed
Improve long help output of split_bams_per_cluster(_htslib).
Improve long help output of split_bams_per_cluster(_htslib) by adding header line content for TSV files and example arguments.
1 parent 3b005fd commit b713a8e

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

rust/src/bin/split_bams_per_cluster.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ struct Cli {
4747
help = "Sample name to BAM filename mapping TSV file.",
4848
long_help = "Sample name to BAM filename mapping TSV file consisting of 2 columns:\n\
4949
\u{20} 1) sample: sample name (same name as used in cluster to cell barcode mapping TSV file)\n\
50-
\u{20} 2) bam_filename: BAM filename"
50+
\u{20} 2) bam_filename: BAM filename\n\
51+
with \"sample\\tbam_filename\" as header."
5152
)]
5253
sample_to_bam_tsv_path: PathBuf,
5354
#[arg(
@@ -59,17 +60,30 @@ struct Cli {
5960
\u{20} 1) cluster: cluster\n\
6061
\u{20} 2) cell_barcode_input: input cell barcode (as written in input BAM files)\n\
6162
\u{20} 3) cell_barcode_output: output cell barcode (as to be written to output cluster BAM file)\n\
62-
\u{20} 4) sample: sample name (same name as used in sample to bam mapping TSV file)"
63+
\u{20} 4) sample: sample name (same name as used in sample to BAM filename mapping TSV file)\n\
64+
with \"cluster\\tcell_barcode_input\\tcell_barcode_output\\tsample\" as header."
6365
)]
6466
cluster_to_cb_and_sample_tsv_path: PathBuf,
6567
#[arg(
6668
short = 'o',
6769
long = "output_prefix",
6870
required = true,
6971
help = "Output prefix.",
70-
long_help = "Output prefix used to create output cluster BAM files for each cluster."
72+
long_help = "Output prefix used to create output cluster BAM files for each cluster.\n\
73+
\u{20} e.g. \"./\", \"/full/path/\", \"./my_sample.\", \"/full/path/my_sample__\", ..."
7174
)]
7275
output_prefix: PathBuf,
76+
/*
77+
#[arg(
78+
long = "chroms",
79+
num_args(0..),
80+
required = false,
81+
help = "List of chromosome names to keep reads for in the output BAM files.",
82+
long_help = "List of chromosome names to keep reads for in the output BAM files.\n\
83+
If not specified, keep reads for all chromosomes in the output BAM files.\n\
84+
\u{20} e.g. --chroms chr1 chr5 chr8"
85+
)]
86+
*/
7387
#[arg(
7488
short = 'f',
7589
long = "fragment_reads_only",

rust/src/bin/split_bams_per_cluster_htslib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ struct Cli {
3434
help = "Sample name to BAM filename mapping TSV file.",
3535
long_help = "Sample name to BAM filename mapping TSV file consisting of 2 columns:\n\
3636
\u{20} 1) sample: sample name (same name as used in cluster to cell barcode mapping TSV file)\n\
37-
\u{20} 2) bam_filename: BAM filename"
37+
\u{20} 2) bam_filename: BAM filename\n\
38+
with \"sample\\tbam_filename\" as header."
3839
)]
3940
sample_to_bam_tsv_path: PathBuf,
4041
#[arg(
@@ -46,15 +47,17 @@ struct Cli {
4647
\u{20} 1) cluster: cluster\n\
4748
\u{20} 2) cell_barcode_input: input cell barcode (as written in input BAM files)\n\
4849
\u{20} 3) cell_barcode_output: output cell barcode (as to be written to output cluster BAM file)\n\
49-
\u{20} 4) sample: sample name (same name as used in sample to bam mapping TSV file)"
50+
\u{20} 4) sample: sample name (same name as used in sample to BAM filename mapping TSV file)\n\
51+
with \"cluster\\tcell_barcode_input\\tcell_barcode_output\\tsample\" as header."
5052
)]
5153
cluster_to_cb_and_sample_tsv_path: PathBuf,
5254
#[arg(
5355
short = 'o',
5456
long = "output_prefix",
5557
required = true,
5658
help = "Output prefix.",
57-
long_help = "Output prefix used to create output cluster BAM files for each cluster."
59+
long_help = "Output prefix used to create output cluster BAM files for each cluster.\n\
60+
\u{20} e.g. \"./\", \"/full/path/\", \"./my_sample.\", \"/full/path/my_sample__\", ..."
5861
)]
5962
output_prefix: PathBuf,
6063
#[arg(
@@ -63,7 +66,8 @@ struct Cli {
6366
required = false,
6467
help = "List of chromosome names to keep reads for in the output BAM files.",
6568
long_help = "List of chromosome names to keep reads for in the output BAM files.\n\
66-
If not specified, keep reads for all chromosomes in the output BAM files."
69+
If not specified, keep reads for all chromosomes in the output BAM files.\n\
70+
\u{20} e.g. --chroms chr1 chr5 chr8"
6771
)]
6872
chromosomes: Option<Vec<String>>,
6973
#[arg(

0 commit comments

Comments
 (0)