[med-svn] [Git][med-team/epcr][master] 2 commits: Add script to fetch the required data for testing

Saira Hussain gitlab at salsa.debian.org
Mon Jun 24 14:18:22 BST 2019



Saira Hussain pushed to branch master at Debian Med / epcr


Commits:
92b00bb3 by Saira Hussain at 2019-06-24T13:16:06Z
Add script to fetch the required data for testing

Python script to fetch the required data from NCBI
database in order to be used for the testing of the package.

- - - - -
12e555ff by Saira Hussain at 2019-06-24T13:17:00Z
Merge branch 'master' of salsa.debian.org:med-team/epcr

- - - - -


2 changed files:

- + debian/tests/data/gingo.fasta
- + debian/tests/fetch_fasta.py


Changes:

=====================================
debian/tests/data/gingo.fasta
=====================================
The diff for this file was not included because it is too large.

=====================================
debian/tests/fetch_fasta.py
=====================================
@@ -0,0 +1,23 @@
+from Bio import Entrez
+
+Entrez.email = 'unknown at debian.org'
+database = 'nucleotide'
+fn = 'data/gingo.fasta'
+
+query = [
+    '((chloroplast OR plastid) AND "complete genome" AND Embryophyta NOT (mi- tochondrion OR mitochondrial)) AND "Ginkgo biloba"'
+]
+
+# Fetch the query IDs
+handle = Entrez.esearch(db=database, term=query)
+record = Entrez.read(handle)
+ids = record['IdList']
+handle.close()
+
+# Fetch the first result
+ff = open(fn, 'w')
+
+handle_fasta = Entrez.efetch(db=database, id=ids[0], rettype='fasta', retmode='text')
+ff.write(handle_fasta.read().rstrip('\n'))
+
+handle_fasta.close()



View it on GitLab: https://salsa.debian.org/med-team/epcr/compare/bfe1a449e2ceb32b5736010cd81c39790625efe8...12e555ff37609d3d9d2a6a6b6b82182fae387094

-- 
View it on GitLab: https://salsa.debian.org/med-team/epcr/compare/bfe1a449e2ceb32b5736010cd81c39790625efe8...12e555ff37609d3d9d2a6a6b6b82182fae387094
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190624/1670beb8/attachment-0001.html>


More information about the debian-med-commit mailing list