Divide amplicon sequences
Project description
join_and_split.py
Helper for join and split fastq files.
Required python 3.6 or above.
Usage
# Linux
## split
python3 join_and_split.py split -m fastq_file
## join
python3 join_and_split.py join -f forward.fastq -r reverse.fastq
# Windows
## split
python join_and_split.py split -m fastq_file
## join
python join_and_split.py join -f forward.fastq -r reverse.fastq
Use -t to set linker text, by default the program use "JOINTEXT".
When split, "fastq_file" could be multiple files, use "*.fastq" (include quotation mark) to represent all ".fastq" files in current folder.
divide.py
Divide NGS data by barcode and primer.
Prerequisite
- Python 3.5 or above
- Biopython
- regex
- vsearch (Optional)
To install Biopython and regex, run as administrator:
pip install biopython regex
Changelog
v4.6
Support ambiguous base.
v4.5
Extend vsearch options. Improve output
v4.2
Integrate vsearch.
v4.0
Use regex instead of BLAST. Faster and easier.
v3.3
Parallel version, use BLAST.
v2.1
Single core version. Use BLAST.
v1.0
Deprecated.
Sequence structure
It can handle merged pair-end sequence like this:
barcode-adapter-primer-sequence-primer-adapter-barcode
Or just handle one direction:
barcode-adapter-primer-sequence
Sequences will be divided by barcode according to given barcode file. If barcode is wrong even only one base, it will be dropped.
adapter
Some one adds sequence between barcode and primer, if you do not have it, just set adapter length to zero by "--adapter 0". The default value is 14.
Barcode mode
Use "-m" to set barcode mode, like "8*1", means barcode with length 5 repeats only 1 times. The default is "5*2", i.e., 5-base barcode repeats twice.
Note that the forward and reverse barcode may be different sequence, but they SHOULD FOLLOW THE SAME MODE!
Strict option
Use "-s" or "--strict" to use strict version. If set, the program will check barcode in head and tail is equal or not and whether barcode in tail (3') is correct. If not, it will only check barcode in head (5') of sequence.
Barcode file
Barcode file looks like this:
sample,barcode-f,barcode-r
S0001,ATACG,ATACG
S0002,ATATA,TATAC
S0003,ATACG
...
The barcode-f means barcode in 5' direction and barcode-r means barcode in 3' direction. All sequences should be forward.
If forward and reverse barcode are same, you can omit the reverse barcode in the table.
To avoid potential error, please do not use space in sample info.
And notice that here it use English comma to seperate two fields rather than Chinese comma.
Primer file
Primer file looks like this:
gene,forward,reverse
rbcL,ATCGATCGATCGA,TACGTACGTACG
matK,AAAATTTTCCCC,GGGGTTACCAAAA
...
Or:
gene,sequence
rbcL-f,ATCGATCGATCGA
rbcL-r,TACGTACGTACG
You can use Microsoft Excel to prepare these two files and save as CSV format, or use any text editor you prefer.
Make sure you don't miss the first line.
task.sh
If you use PBS task submitting system, you can use this script to submit the task, and you can finish the work from combine two direction sequence by flash and join_fastq.py to divide them.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file divide_seq-5.22-py3-none-any.whl
.
File metadata
- Download URL: divide_seq-5.22-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 723bb4b2c60191ba7628627dd6f711e739f76da84494895032f69ecf08058266 |
|
MD5 | b0af805e5ccdc44de9646d8b10baa807 |
|
BLAKE2b-256 | 4ae4207b19577b569322a016bc3925c64bb5bc2a9b53dd80ffa1574f5a2dc8a3 |