Skip to content

Commit

Permalink
help options
Browse files Browse the repository at this point in the history
  • Loading branch information
hasindu2008 committed Feb 19, 2024
1 parent b532c1e commit 267a381
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 5 additions & 2 deletions docs/man.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Advanced options are as below:
- `--prefix=yes/no`: generate prefixes such as adaptor (and polya for RNA). [default: no]
- `--seed INT`: seed for random generators (if 0, will be autogenerated). Giving the same seed will produce same results. [default: 0]
- `--paf-ref`: in paf output, use the reference as the target instead of read (needs -c)
- `--cdna`: generate cDNA reads (only valid with dna profiles and the reference must a transcriptome, experimental)
- `--trans-count FILE`: simulate relative abundance using specified 2-column tsv with first column containing transcript name and the second containing the count (only for direct-rna and cDNA, experimental)
- `--trans-trunc=yes/no`: simulate transcript truncation (only for direct-rna and cDNA, experimental) [default: no]

Developer options (which are not much tested and error handling) are as below:

Expand All @@ -37,5 +40,5 @@ Developer options (which are not much tested and error handling) are as below:
- `--range FLOAT`: ADC range (see [here](https://hasindu2008.github.io/slow5specs/summary))
- `--offset-mean FLOAT`: ADC offset mean (see [here](https://hasindu2008.github.io/slow5specs/summary))
- `--offset-std FLOAT`: ADC offset standard deviation (see [here](https://hasindu2008.github.io/slow5specs/summary))
- `--median-before-mean`: Median before mean (see [here](https://hasindu2008.github.io/slow5specs/summary))
- `--median-before-std`: Median before standard deviation (see [here](https://hasindu2008.github.io/slow5specs/summary))
- `--median-before-mean`: Median before mean (see [here](https://hasindu2008.github.io/slow5specs/summary))
- `--median-before-std`: Median before standard deviation (see [here](https://hasindu2008.github.io/slow5specs/summary))
14 changes: 11 additions & 3 deletions src/sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@ static void print_help(FILE *fp_help, opt_t opt, profile_t p, int64_t nreads) {
fprintf(fp_help," --prefix=yes|no generate prefixes such as adaptor (and polya for RNA) [no]\n");
fprintf(fp_help," --seed INT seed or random generators (if 0, will be autogenerated) [%ld]\n",opt.seed);
fprintf(fp_help," --paf-ref in paf output, use the reference as the target instead of read (needs -c)\n");
fprintf(fp_help," --cdna generate CDNA reads (only valid with dna profiles and the reference must a transciptome)\n");
fprintf(fp_help," --trans-count FILE simulate relative abundance using specified tsv with transcript name & count (only for direct-rna and cdna)\n");
fprintf(fp_help," --trans-trunc=yes/no simulate transcript truncatation (only for direct-rna and cdna) [no]\n");
fprintf(fp_help," --cdna generate cDNA reads (only valid with dna profiles and the reference must a transcriptome, experimental)\n");
fprintf(fp_help," --trans-count FILE simulate relative abundance using specified tsv with transcript name & count (only for direct-rna and cDNA, experimental)\n");
fprintf(fp_help," --trans-trunc=yes/no simulate transcript truncattion (only for direct-rna and cDNA, experimental) [no]\n");

fprintf(fp_help,"\ndeveloper options (not much tested yet):\n");
fprintf(fp_help," --digitisation FLOAT ADC digitisation [%.1f]\n",p.digitisation);
Expand Down Expand Up @@ -908,12 +908,15 @@ int sim_main(int argc, char* argv[], double realtime0) {
} else if (c == 0 && longindex == 32){ //transcript count
trans_count = optarg;
opt_gvn.trans_count = 1;
WARNING("%s","Option --trans-count is experimental. Please report any issues.")
} else if (c == 0 && longindex == 33){ //transcript trunctate
opt_gvn.trans_trunc = 1;
yes_or_no(&opt, SQ_TRANS_TRUNC, longindex, optarg, 1);
WARNING("%s","Option --trans-trunc is experimental. Please report any issues.")
} else if (c == 0 && longindex == 34){ //cdna
opt_gvn.cdna = 1;
opt.flag |= SQ_CDNA;
WARNING("%s","Option --cdna is experimental. Please report any issues.")
} else if (c == '?'){
exit(EXIT_FAILURE);
} else {
Expand All @@ -930,6 +933,11 @@ int sim_main(int argc, char* argv[], double realtime0) {
//check args
check_args(opt_gvn, rna, opt, paf);

if((opt.flag & SQ_CDNA) && (opt.flag & SQ_PREFIX)){
ERROR("%s","Option --prefix is not yet implemnted for --cdna.");
exit(EXIT_FAILURE);
}

if (opt.seed == 0){
opt.seed = realtime0;
VERBOSE("Using random seed: %ld",opt.seed);
Expand Down

0 comments on commit 267a381

Please sign in to comment.