comparison MIRUReader/README.md @ 0:f0e3646a4e45 draft

Uploaded
author dcouvin
date Tue, 17 Aug 2021 19:15:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0e3646a4e45
1 # MIRUReader
2
3 ## Description
4
5 Identify 24-locus MIRU-VNTR for *Mycobacterium tuberculosis* complex (MTBC) directly from long reads generated by Oxford Nanopore Technologies (ONT) and Pacific Biosciences (PacBio). Also work on assembled genome.
6
7 ## Requirements
8
9 * Linux
10 * primersearch from [EMBOSS](http://emboss.sourceforge.net/download/)
11 * install from the official website or
12 * install via conda `conda install -c bioconda emboss`
13 * Ensure the primersearch command is in your device's environment path, where primersearch program can be executed directly by typing `primersearch` on the commandline
14 * [*pandas*](https://pandas.pydata.org/)
15 * can be installed via conda `conda install pandas` or via PyPI `pip install pandas`
16 * [*statistics*](https://pypi.org/project/statistics/)
17 * can be installed via PyPI `pip install statistics`
18
19 ## Installation
20
21 `git clone https://github.com/phglab/MIRUReader.git`
22
23 ## Change log
24 #### 13/09/2019
25 - Added a check to ensure primersearch is executable prior to MIRUReader program execution
26 - Updated documentation to the README
27
28 #### 04/07/2019
29 - Update output format for option '--details'.
30
31 #### 14/06/2019
32 - Auto convert fastq to fasta.
33
34 ## Usage example
35
36 For one sample analysis:
37 ```
38 python /your/path/to/MIRUReader.py -r sample.fasta -p sampleID > miru.txt
39 ```
40
41 For multiple samples analysis:
42 1. Create a mapping file (mappingFile.txt) that looks like:
43
44 sample_001.fasta sample_001 \
45 sample_002.fasta sample_002 \
46 ...
47
48 2. Then run the program:
49 ```
50 cat mappingFile.txt | while read -a line; do python /your/path/to/MIRUReader.py -r ${line[0]} -p ${line[1]}; done > miru.multiple.txt
51 ```
52
53 ## Output example
54
55 ```
56 sample_prefix 0154 0424 0577 0580 0802 0960 1644 1955 2059 2163b 2165 2347 2401 2461 2531 2687 2996 3007 3171 3192 3690 4052 4156 4348
57 sample_001 2 4 4 2 3 3 3 2 2 5 4 4 4 2 5 1 6 3 3 5 3 7 2 3
58 ```
59
60 Notes:
61 * The program is compatible to Python 2 and Python 3.
62 * Accepted reads file format includes '.fastq', '.fastq.gz', '.fasta', and '.fasta.gz'.
63 * The program output is a tab-delimited plain text which can be copied to or opened in Excel spreadsheet.
64
65 ## Full usage
66
67 | Main options | Description |
68 | ------------ | ----------- |
69 | -r READS | Input reads file in fastq/fasta format, can be gzipped or not gzipped |
70 | -p PREFIX | Sample ID required for naming output file. |
71 | --table TABLE | Allele calling table, default is MIRU_table. Can be user-defined in fixed format. However, providing custom allele calling table for other VNTR is not tested. |
72 | --primers PRIMERS | Primers sequences, default is MIRU_primers. Can be user-defined in fixed format. |
73
74
75 | Optional options | Description |
76 | ---------------- | ----------- |
77 | --amplicons | Use output from primersearch ("prefix.18.primersearch.out") and summarize MIRU profile directly. |
78 | --details | This option is for further inspection. It displays details of repeat count for each loci with total mismatch error in the primer sequences alignment. |
79 | --nofasta | Delete fasta file generated if your input read is in fastq format. |
80
81 ## FAQ
82 1. **Why are there two MIRU allele calling tables (MIRU_table and MIRU_table_0580)?**
83
84 MIRU loci 0580 (MIRU_table_0580) consist of a different numbering system for determination of repeat numbers as compared to the other 23 MIRU locus (MIRU_table) for MTBC isolates.
85
86
87 ## Troubleshooting
88 1. If an error message `OSError: primersearch is not found.` appears, please ensure your `primersearch` executable file is in your environment path (`echo $PATH`) and can be called directly.