Debian Codegraph @

README.md

raw symbols SCIP
1 # readucks
2 <p align="center"><img src="images/readucks.png" alt="READUCKS" width="400"></p>
3
4 #### Nanopore read de-multiplexer (read demux -> readux -> readucks, innit).
5
6 This package is inspired by the demultiplexing options in [`porechop`](https://github.com/rrwick/Porechop) (by [Ryan Wick](https://github.com/rrwick)) but without the adapter trimming options - it just demuxes. It uses the [`parasail` library](https://github.com/jeffdaily/parasail) with its [Python bindings](https://github.com/jeffdaily/parasail-python) to do pairwise alignment which provides a considerable speed up over the [`seqan` library](https://github.com/seqan/seqan) used by `porechop` due to its low-level use of vector processor instructions.
7
8 Additional speed-ups come from specifying exactly which barcodes are present so it limits searching only to those (this is usually something you know, after all).
9
10 There is also more flexibility with how double barcodes are called (i.e., when you only call a read's barcode if it has the matching barcode sequence at both ends to reduce the chance of mis-called reads). In `readucks` you can specify a lower identity threshold for the secondary barcode than the primary. The primary barcode is defined as the one with the highest match (either at the start or end of the read). The secondary barcode is then the other one. The secondary barcode must match the primary (i.e., be from the same pair) but may have more read errors.
11
12 We are currently investigating the optimal settings for this to trade off between sensitivity and specificity for double barcoding.s
13
14 One source file `misc.py` is from `porechop` and is provided with its original licencing information.
15
16 ## Installation
17
18 ```
19 git clone https://github.com/rambaut/readucks.git
20 ```
21
22 Install dependencies
23 ```
24 pip install biopython
25 pip install parasail
26 ```
27
28 Install Readucks
29 ```
30 cd readucks
31 python setup.py install
32 ```
33
34 Run Readucks
35 ```
36 readucks --help
37 ```
38
39 ## Running
40
41 #### Command line options:
42 ```
43 usage: readucks -i INPUT_PATH [-o OUTPUT_DIR] [-b] [-a] [-e]
44 [-p PREFIX] [-t THREADS] [-v VERBOSITY] [--single]
45 [--native_barcodes] [--pcr_barcodes]
46 [--rapid_barcodes]
47 [--limit_barcodes_to LIMIT_BARCODES_TO [LIMIT_BARCODES_TO ...]]
48 [--threshold THRESHOLD]
49 [--secondary_threshold SECONDARY_THRESHOLD]
50 [--scoring_scheme SCORING_SCHEME] [-h] [--version]
51 ```
52
53 #### Main options:
54
55 > `-i INPUT_PATH`, `--input INPUT_PATH`
56
57 Provide a path to a input file or directory of input files to be processed. These should be either `FASTQ` or `FASTA` files with appropriate file extensions (`.fastq` or `.fasta`).
58
59 > `-o OUTPUT_DIR`, `--output_dir OUTPUT_DIR`
60
61 Provide the path of a directory into which output files will be placed. If this is not specified then the output files will go into the current working directory (except for annotation CSV files - these will be placed along side their matching read files).
62
63 > `-b`, `--bin_barcodes`
64
65 This option will bin reads into files according to their assigned barcodes. One file (either FASTQ or FASTA depending on the input file types) will be produced for each barcode that is called (and one for unassigned reads).
66
67 > `-a`, `--annotate_files`
68
69 This option writes a CSV file for each input file (with a corresponding file name) containing the barcode assignment for each read.
70
71 > `-e`, `--extended_info`
72
73 When provided with the `-a` option, this writes much more detailed information about the barcode matches to the annotation (CSV) file.
74
75 > `-p PREFIX`, `--prefix PREFIX`
76
77 Give an optional prefix string that will be prepended to each output file.
78
79 > `-t THREADS`, `--threads THREADS`
80
81 The number of parallel threads to use (1 to turn off multithreading) (default: automatic)
82
83 > `-v VERBOSITY`, `--verbosity VERBOSITY`
84
85 Specify the level of output information: 0 = none, 1 = some, 2 = lots (default: 1)
86
87 #### Demuxing options:
88
89 > `--single`
90
91 Only attempts to match a single barcode at one end (default double)
92
93 > `--native_barcodes`
94
95 Only attempts to match the 24 native nanopore barcodes (default)
96
97 > `--pcr_barcodes`
98
99 Only attempts to match the 96 PCR barcodes
100
101 > `--rapid_barcodes`
102
103 Only attempts to match the 12 rapid barcodes
104
105 > `--limit_barcodes_to LIMIT_BARCODES_TO [LIMIT_BARCODES_TO ...]`
106
107 Specify a list of barcodes to look for (numbers, indexed from 1, refer to native, PCR or rapid barcodes as specified)
108
109 #### Barcode search settings:
110
111 > `--threshold THRESHOLD`
112
113 A read must have at least this percent identity to a barcode (default: 90.0)
114
115 > `--secondary_threshold SECONDARY_THRESHOLD`
116
117 When double barcoding the second barcode (the one with the lower identity of the two) must have at least this percent identity (and match the first one) (default: 70.0)
118
119 > `--scoring_scheme SCORING_SCHEME`
120
121 Scoring scheme for the pairwise alignment. A comma-delimited string of alignment scores: match, mismatch, gap open, gap extend (default: 3,-6,-5,-2)
122
123 #### Example commands
124
125 ```
126 readucks -i my_reads.fastq -o demuxed/ -b --native_barcodes --verbosity 1
127 ```
128 This will demux the reads in `my_reads.fastq`, producing bin files in a directory called `demuxed` (which must already exist), giving some feedback information to the screen.