Skip to content

Commit

Permalink
README typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremiah Wala committed Jul 10, 2016
1 parent ad55838 commit be5675a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ minimum accepted value (``"mapq" : 30``). To instead reject reads in this bounda
``"mapq" : [100, 30]`` accepts only reads with MAPQ < 30 || MAPQ > 100.

###### Flag rules
Flag rules can be input using keywords like ``"mapped" : true`` or more versatily using the raw flag ``"off_flag" : 4``. Use
``on_flag`` to set all of the flags that must be turned on, and ``off_flag`` for that must be turned off. Thus, ``"off_flag" : 4``
Flag rules can be input using keywords like ``"mapped" : true`` or more versatily using the raw flag ``"!flag" : 4``. Use
``flag`` to set all of the flags that must be turned on, and ``!flag`` for that must be turned off. Thus, ``"!flag" : 4``
requires that the "unmapped" bit be turned off, and so accepts only mapped reads.

Command Line Usage
Expand All @@ -428,13 +428,11 @@ You can specify simple scripts directly on the command line:
variant $bam -l myvcf.vcf -f 1 -F 1024 -P 100 -o out.bam
```

JSON scripts can also be supplied directly, just make sure to use single qutoes and remove spaces:
JSON scripts can also be supplied directly, just make sure to encase in single quotes and remove spaces:
```bash
variant $bam -g WG -r '{"":{"rules":[{"motif":"mymotifs.txt"}]}}' -o out.bam
```

Note the single quotes so that it is interpreted as a string literal in BASH

### Full list of options

```
Expand All @@ -448,7 +446,7 @@ Description: Filter a BAM/CRAM file according to hierarchical rules
-c, --counts-file File to place read counts per rule / region
-x, --counts-file-only Same as -c, but does counting only (no output BAM)
-r, --rules JSON script for the rules.
-k, --proc-regions-file Samtools-style region string (e.g. 1:1,000,000-2,000,000) or BED file of regions to proess reads from
-k, --proc-regions-file Samtools-style region string (e.g. 1:1,000-2,000) or BED of regions to process
Output options
-o, --output-bam Output BAM file to write instead of SAM-format stdout
-C, --cram Output file should be in CRAM format
Expand All @@ -458,13 +456,13 @@ Description: Filter a BAM/CRAM file according to hierarchical rules
-S, --strip-all-tags Remove all alignment tags
Filtering options
-q, --qc-file Output a qc file that contains information about BAM
-m, --max-coverage Maximum coverage of output file. BAM must be sorted. Negative values enforce a minimum coverage.
-m, --max-coverage Maximum coverage of output. BAM must be sorted. Negative vals enforce min coverage.
Region specifiers
-g, --region Regions (e.g. myvcf.vcf or WG for whole genome) or newline seperated subsequence file. Applied in same order as -r for multiple
-G, --exclude-region Same as -g, but for region where satisfying a rule EXCLUDES this read. Applied in same order as -r for multiple
-g, --region Regions (e.g. myvcf.vcf or WG for whole genome) or newline seperated subsequence file.
-G, --exclude-region Same as -g, but for region where satisfying a rule EXCLUDES this read.
-l, --linked-region Same as -g, but turns on mate-linking
-L, --linked-exclude-region Same as -l, but for mate-linked region where satisfying this rule EXCLUDES this read.
-P, --region-pad Apply a padding to each region supplied to variantBam with the -l, -L, -g or -G region flags (specify after region flag)
-P, --region-pad Apply a padding to each region supplied with the region flags (specify after region flag)
Command line rules shortcuts (to be used without supplying a -r script)
--min-phred Set the minimum base quality score considered to be high-quality
--min-clip Minimum number of quality clipped bases
Expand All @@ -488,6 +486,7 @@ Full list of available JSON rules
!flag "!flag" : 4 Set the flag bits that must be OFF
motif "motif" : seqs.txt File containing substrings that must be present in the sequence.
!motif "!motif" : seqs.txt File containing substrings that must NOT be present in the sequence.
rg "rg" : "H01PE.2" Limit to just a single read-group
duplicate "duplicate" : true Read must be marked as optical duplicate
supp "supp" : false Read must be primary alignment
qcfail "qcfail" : false Read must note be marked as QC Fail
Expand Down
2 changes: 1 addition & 1 deletion examples/rules.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"global" : {
"region" : "WG",
"rules" : [{"off_flag" : 3840, "phred" : 5}]
"rules" : [{"!flag" : 3840, "phred" : 5}]
},
"SV" : {
"region" : "WG",
Expand Down
8 changes: 4 additions & 4 deletions src/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static const char *VARIANT_BAM_USAGE_MESSAGE =
" -c, --counts-file File to place read counts per rule / region\n"
" -x, --no-output Don't output reads (used for profiling with -q and/or counting with -c)\n"
" -r, --rules JSON ecript for the rules.\n"
" -k, --proc-regions-file Samtools-style region string (e.g. 1:1,000,000-2,000,000) or BED file of regions to proess reads from\n"
" -k, --proc-regions-file Samtools-style region string (e.g. 1:1,000-2,000) or BED of regions to process\n"
" Output options\n"
" -o, --output-bam Output BAM file to write instead of SAM-format stdout\n"
" -C, --cram Output file should be in CRAM format\n"
Expand All @@ -36,11 +36,11 @@ static const char *VARIANT_BAM_USAGE_MESSAGE =
" -q, --qc-file Output a qc file that contains information about BAM\n"
" -m, --max-coverage Maximum coverage of output file. BAM must be sorted. Negative values enforce a minimum coverage\n"
" Region specifiers\n"
" -g, --region Regions (e.g. myvcf.vcf or WG for whole genome) or newline seperated subsequence file. Applied in same order as -r for multiple\n"
" -G, --exclude-region Same as -g, but for region where satisfying a rule EXCLUDES this read. Applied in same order as -r for multiple\n"
" -g, --region Regions (e.g. myvcf.vcf or WG for whole genome) or newline seperated subsequence file.\n"
" -G, --exclude-region Same as -g, but for region where satisfying a rule EXCLUDES this read.\n"
" -l, --linked-region Same as -g, but turns on mate-linking\n"
" -L, --linked-exclude-region Same as -l, but for mate-linked region where satisfying this rule EXCLUDES this read.\n"
" -P, --region-pad Apply a padding to each region supplied to variantBam with the -l, -L, -g or -G region flags. ** Must place after region flag! ** \n"
" -P, --region-pad Apply a padding to each region supplied with the region flags (specify after region flag)\n"
" Command line rules shortcuts (to be used without supplying a -r script)\n"
" --min-phred Set the minimum base quality score considered to be high-quality\n"
" --min-clip Minimum number of quality clipped bases\n"
Expand Down

0 comments on commit be5675a

Please sign in to comment.