Repository navigation
Updated docs on using Entrez with Acc instead of GI - #1071
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1071 +/- ##
==========================================
- Coverage 80.75% 80.75% -0.01%
==========================================
Files 322 322
Lines 49424 49424
==========================================
- Hits 39913 39911 -2
- Misses 9511 9513 +2
Continue to review full report at Codecov.
|
| LOCUS EU490707 1302 bp DNA linear PLN 26-JUL-2016 | ||
| DEFINITION Selenipedium aequinoctiale maturase K (matK) gene, partial cds; | ||
| chloroplast. | ||
| chloroplast. |
There was a problem hiding this comment.
Based on the GitHub diff, it looks like somehow the indentation has changed, perhaps to tabs?
(This affects the entire GenBank record, including the features and sequence)
There was a problem hiding this comment.
I thought that the change was in the gb format itself so I left it there.
It is more readable with a smaller indentation, would you prefer it as it was?
There was a problem hiding this comment.
My bad, just spotted the error and the reason for it. Fixed.
| from Bio import Entrez | ||
| Entrez.email = "[email protected]" # Always tell NCBI who you are | ||
| filename = "gi_186972394.gbk" | ||
| filename = "Acc_EU490707.gbk" |
There was a problem hiding this comment.
Just EU490707.gbk as the filename would be fine and consistent with NCBI usage.
| retstart=start, retmax=batch_size, | ||
| webenv=webenv, query_key=query_key) | ||
| webenv=webenv, query_key=query_key, | ||
| idtype="acc") |
There was a problem hiding this comment.
Again, something funny with the indentation here based on the GitHub diff view.
| loci = {} | ||
| for entry in table: | ||
| if len(entry) < 3: | ||
| if len(entry) < 4: |
There was a problem hiding this comment.
This looks like it was originally intended for pul request #583 (nothing to do with the Entrez pull request)
There was a problem hiding this comment.
Seems like I messed up the branching. Sorry about that.
It's fixed now.
| >>> handle = Entrez.efetch(db="nucleotide", id="186972394", rettype="gb", retmode="text") | ||
| >>> print(handle.read()) | ||
| LOCUS EU490707 1302 bp DNA linear PLN 05-MAY-2008 | ||
| LOCUS EU490707 1302 bp DNA linear PLN 26-JUL-2016 |
There was a problem hiding this comment.
You've accidentally (?) lost the >>> python code here.
There was a problem hiding this comment.
I really have no idea how this could have happened... Many thanks for spotting it! I have put it back (the accession version, and not the GI I had replaced).
|
It looks like there are doctests in Right now that is failing for me, looks like some Python 3 issues needs fixing somewhere... I'm looking at this now. |
|
The doctests should now be working on the master branch - see 85a7462 You can now also run the Are you familiar with If not, don't worry - I can look at it. |
|
I had never done a |
|
I'm getting these failures: I'll try to find what went wrong and fix them. |
|
Running the tests from your branch seems OK for me - you might have to explicitly install Biopython first, there's something odd with doctests sometimes - #531 |
|
Oh, good, I was getting lost trying to debug this! |
|
Don't worry about the coverage change - it gives tiny fluctuations anyway. |
|
Thank you - acknowledged in 48d6d31 |
Squashed commit of pull request biopython#1071, closes biopython#926.
As of October 2016 GI identifiers are discontinued in favour of accession numbers.
This PR updated the docs to use Accession numbers instead of GIs as identifiers.