我想从NCBI使用Biopython模块获取fasta序列的登录号码。通常序列已成功下载。但是,一旦在一段时间我得到下面的错误如何处理IncompleteRead:在biopython
http.client.IncompleteRead:IncompleteRead
我寻觅的答案How to handle IncompleteRead: in python
(61808640个字节读)我已经尝试了上面的答案https://stackoverflow.com/a/14442358/4037275 。这是工作。但是,问题是,它会下载部分序列。有没有其他办法。任何一个人都可以指引我正确的方向。
谢谢你的时间。
from Bio import Entrez
from Bio import SeqIO
Entrez.email = "my email id"
def extract_fasta_sequence(NC_accession):
"This takes the NC_accession number and fetches their fasta sequence"
print("Extracting the fasta sequence for the NC_accession:", NC_accession)
handle = Entrez.efetch(db="nucleotide", id=NC_accession, rettype="fasta", retmode="text")
record = handle.read()