iVar

Readme.md
1 Manual {#mainpage}
2 ============
3
4 ## Available Commands
5
6 | Command | Description |
7 |:--------|:------------|
8 | trim | Trim reads in aligned BAMs |
9 | variants | Call variants from aligned BAM file |
10 | filtervariants | Filter variants across replicates
11 | consensus | Call consensus from aligned BAM file |
12 | getmasked | Get amplicons with primer mismatches |
13 | removereads | Remove reads from trimmed BAM file |
14 | version | Show version information |
15 | trimadapter | (EXPERIMENTAL) Trim adapter sequences from reads |
16
17 To view detailed usage for each command type `ivar <command>`
18 Note : Commands maked (EXPERIMENTAL) are still under active development.
19
20 ## Description of commands
21
22 #### Trim primer sequences with iVar
23
24 Command:
25 ```
26 ivar trim
27
28 Usage: ivar trim -i <input.bam> -b <primers.bed> -p prefix [-m <min-length>] [-q <min-quality>] [-s <sliding-window-width>]
29
30 Input Options Description
31 -i (Required) <input.bam> Indexed aligned bam file to trim primers and quality
32 -b (Required) <primers.bed> BED file with primer sequences and positions
33 -m Minimum length of read to retain after trimming (Default: 30)
34 -q Minimum quality threshold for sliding window to pass (Default: 20)
35 -s Width of sliding window (Default: 4)
36
37 Output Options Description
38 -p (Required) Prefix for the output BAM file
39 ```
40
41 Example Usage:
42 ```
43
44 ```
45
46 #### Call variants with iVar
47
48 Command:
49 ```
50 ivar variants
51
52 Usage: samtools mpileup -A -d 300000 --reference <reference-fasta> -Q 0 -F 0 <input-bam> | ivar variants -p prefix [-q <min-quality>] [-t <min-frequency-threshold>]
53
54 Note : samtools mpileup output must be piped into ivar variants
55
56 Input Options Description
57 -q <min-quality> Minimum quality threshold to count base (Default: 20)
58 -t <min-frequency-threshold> Minimum frequency threshold(0 - 1) to call variants (Default: 0.03)
59
60 Output Options Description
61 -p (Required) Prefix, prefix for the output tsv variant file
62 ```
63
64 Example Usage:
65 ```
66
67 ```
68
69 #### Filter variants across replicates with iVar
70
71 Command:
72 ```
73 ivar filtervariants
74 Usage: ivar filtervariants [-p prefix] replicate-one.tsv replicate-two.csv ...
75
76 Output Options Description
77 -p (Required) Prefix, prefix for the filtered tsv file
78
79 ```
80
81 Example Usage:
82 ```
83
84 ```
85
86 #### Call a consensus sequences from an aligned BAM file.
87
88 Command:
89 ```
90 ivar consensus
91 Usage: samtools mpileup -A -d 300000 -Q 0 -F 0 [<input-bam>] | ivar consensus [-p prefix]
92
93 Note : samtools mpileup output must be piped into "ivar consensus"
94
95 Input Options Description
96 -q Minimum quality threshold to count base (Default: 20)
97 -t Threshold(0 - 100) to call consensus (Default: 0)
98 Output Options Description
99 -p (Required) Prefix, prefix for the output tsv file
100 ```
101
102 Example Usage:
103 ```
104
105 ```
106
107 #### Get primers with mismatches to the reference sequence.
108
109 Command:
110 ```
111 ivar getmasked
112 Usage: ivar getmasked [-i <input-filtered-tsv>] [-b <bed-file>]
113
114 Input Options Description
115 -i (Required) Input filtered variants tsv generated from "ivar filtervariants"
116 -b (Required) Bed file with primer indices
117 ```
118
119 Example Usage:
120 ```
121
122 ```
123
124 #### Remove reads associated with mismatched primer indices
125
126 Command:
127 ```
128 ivar removereads
129 Usage: ivar removereads [-i <input-bam>] [-p prefix] primer-index-1 primer-index-2 primer-index-3 primer-index-4 ...
130
131 Input Options Description
132 -i (Required) Input BAM file run through `ivar trim` command whcih adds the primer number to BAM auxillary data
133 Output Options Description
134 -p (Required) Prefix, prefix for the filtered BAM file
135 ```
136
137 Example Usage:
138 ```
139
140 ```