ropolomx / flumatch Goto Github PK
View Code? Open in Web Editor NEWAutomating Prokka annotations, BLAST runs and generation of BLAST reports
Automating Prokka annotations, BLAST runs and generation of BLAST reports
Use os.osdir
Make few changes to libraries imported and syntax
Use os.makedir to create and os.access to check the directories exist
Design method to differentiate between H5 and H7 hi-path and low-path and classify strains accordingly. This can be part of the same script or part of a downstream application.
Very related to Issue #11 .
Two avenues can be taken here:
for i in $(seq -w 0 99); do
wget -q --continue --wait 10 --random-wait ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.${i}.tar.gz &&
wget -q --continue --wait 10 --random-wait ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.${i}.tar.gz.md5 &&
echo "Successfully retrieved nt.${i}.tar.gz" ||
echo "nt.${i}.tar.gz failed or does not exist.";
done
Currently, the script returns a table with the annotated contig (query), target strain and other BLAST coverage information. It would be very nice to add metadata such as country by retrieving it from Genbank records. This could perhaps be done by feeding a list of accessions to a Genbank entrez search (in the style of this example. Alternatively, we could have a reference metadata table from FluDB, and then just cross-reference a list of accessions from the BLAST results to the information of that table
Currrently, the script stops (hangs up, really) at "Please rename your contigs or use --centre XXX to generate clean contig names"
if FASTA headers are longer than 20 characters (prokka 1.11
). If this happens, the program needs to exit.
Better yet: since this is a very common occurrence, a regex or a sed command could be integrated into the script so that this is taken care of during program run. Alternatively, sharing a sed command with the user to shorten the FASTA header could be a short-term solution.
Python or cat
command ... or for loop from shell
It would be great to allow users to either start with raw reads and perform assembly with SPAdes or to start from assembled contigs. If we start with SPAdes assembly, then we should integrate annotation, BLAST search and report generation in the same script (the same way it is currently done if one starts with assembled contigs).
It would be good to parse and split the BLAST subject names so that each category would be displayed in a separate column/field
Current:
Query | Subject |
---|---|
La_Habana_test_00001 Polymerase basic protein 2 | Influenza A virus (A/swine/Pinar del Rio/3/2010(H1N1)) segment 1, complete genome |
Desirable:
Query | Subject Accession | Subject Strain Name | Subject Subtype | Subject Segment / Gene |
---|---|---|---|---|
La_Habana_test_00001 Polymerase basic protein 2 | HE589463.1 | Influenza A virus A/swine/Pinar del Rio/3/2010 | H1N1 | Segment 1 |
Currently the BLAST search uses the user-defined contig FASTA (i.e. args.contigs
) as the query. However, using the strain/strain.ffn
file generated by Prokka as the BLAST query is important because the FASTA headers of that file contain the annotation designated by Prokka.
Desired output:
Query (Prokka annotation) | Strain |
---|---|
La_Habana_test_00001 Polymerase basic protein 2 | Target Strain Name |
Current output:
Query (FASTA header from user-defined file) | Strain |
---|---|
HE584753.1 | Target Strain Name |
Alternatively, including both columns is also desirable:
Contig name | Prokka annotation | Strain |
---|---|---|
HE584753.1 | La_Habana_test_00001 Polymerase basic protein 2 | Target Strain Name |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.