[med-svn] [Git][med-team/epcr][master] Refactor the fetching script to fetch all the data

Saira Hussain gitlab at salsa.debian.org
Thu Jun 27 10:46:02 BST 2019



Saira Hussain pushed to branch master at Debian Med / epcr


Commits:
bf488007 by Saira Hussain at 2019-06-27T09:45:07Z
Refactor the fetching script to fetch all the data

Rename and refactor the fasta fetching script in order to fetch
all the data and save them in the right directore

- - - - -


1 changed file:

- − debian/tests/fetch_fasta.py


Changes:

=====================================
debian/tests/fetch_fasta.py deleted
=====================================
@@ -1,25 +0,0 @@
-#!/usr/bin/python3
-
-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/commit/bf488007d0ef797e1bac0bbf228025ca4c9167bd

-- 
View it on GitLab: https://salsa.debian.org/med-team/epcr/commit/bf488007d0ef797e1bac0bbf228025ca4c9167bd
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/20190627/8fa59ba9/attachment-0001.html>


More information about the debian-med-commit mailing list