Combine acc2gb.py and fetchseq.py, putting db and rettype as arguments
See original GitHub issueThe scripts acc2gb.py
and fetchseq.py
do essentially the same thing: they use the Entrez system to download data from NCBI.
We can combine them into a single, multi-purpose script by removing some of the hard-coded parameters and making them command line arguments. We’ll keep the acc2gb.py
script and delete fetchseq.py
since it has fewer calls and @aays knows what they are.
These are the changes that need to be made:
- Remove hardcoded
db
parameter on line 22 and make it a command line argument - Remove hardcoded
rettype
parameter on line 33 and make it a command line argument - Add parameter
retmode="text"
on line 33, same as infetchseq.py
. - Include in the documentation what ‘db’ and ‘rettype’ mean and which arguments would be used in which situations. For now, these are the two we’ve been using:
- Case 1:
rettype = gbwithparts
,db = nuccore
- downloads genbank file with metadata and fasta DNA sequence (i.e. for downloading bacterial genomes with metadata) - Case 2:
rettype = fasta
,db = protein
- downloads fasta file with protein sequence (i.e. for downloading antiCRISPR protein sequences for BLAST) - Delete
fetchseq.py
.
Submit a PR to the master
branch when complete! If you have any questions at all, ping me or @aays and we’ll get back to you ASAP.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (10 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mbonsma @aays ready for review 😃
@morrme true, good point. We can leave that one out then.