我有这个sql查询,这需要很长时间才能完成。我怎么才能加快速度?
t_inter_specises_interaction有60k行,t_pathway有100 k行。uniprot_id_1、uniprot_id_2、uniprot_id是varchar类型。
在这个查询中,我希望选择uniprot_id_1和uniprot_id_2,它们都存在于t_pathway中:
select distinct uniprot_id_1,uniprot_id_2 from t_intra_species_interaction
where uniprot_id_1 in (select uniprot
我有一个包含uniprot登录和I的数据文件,如下所示:
> a <- data.frame(protein=c("sp|A6NCE7|MP3B2_HUMAN,sp|Q9GZQ8|MLP3B_HUMAN","sp|A6NL28|TPM3L_HUMAN","sp|B5ME19|EIFCL_HUMAN,sp|Q99613|EIF3C_HUMAN"),stringsAsFactors=FALSE)
> a
protein
1 sp|A6NCE7|MP3B2_H
我有一个有用的代码,但它有很多缺陷。
主要项目是从网站中获取价值。我需要完成这个动作上百万次,所以我下载从类方法返回的网页,然后解析它。如果该页面已经下载,我只是打开一个。
这段代码可以工作,但是即使在多个except socket.error中,我有时也会在并行运行时得到套接字错误。
另外,我对编程还有点陌生,所以任何建议都会很感激。(我知道这个代码太长了)
class Uniprot:
"""
Gets the UNIPROT XML or HTML, very bad code.... Cant come up with a better one
我有以下函数(属于类):
import Bio
from bioservices import KEGGParser, UniProt, QuickGO
def locate_common_GO(self,list_of_genes,GO_term):
#initialize variables and classes
q = QuickGO()
a = Retrieve_Data()
b=[]
#get the uniprot IDS using hugo2uniprot. hugo2uniprot is a custom method
我正在尝试访问UniProt数据库中的FASTA序列。当输入正确的UniProt代码(6位字符串,例如P10079)时,这目前是有效的,但是,如果输入错误的字符串,它会使我的程序崩溃。我试图写一个循环,这样用户就可以重新输入另一个代码,直到正确输入一个代码,尽管我仍然收到错误。这是因为我没有在函数中使用它吗?干杯
#Get User Input and access data from UniProt
user_input = input ("Type in your protein accession code: ")
try:
handle = ExPASy
我想将文件路径从Python输送到Perl脚本。虽然我熟悉Python和Bash,但我对Perl一无所知。
我有以下(示例)文件:
return.py
print( 'data/test.txt' )
uniprot.pl
use strict;
use warnings;
use LWP::UserAgent;
my $list = $ARGV[0]; # File containg list of UniProt identifiers.
my $base = 'http://www.uniprot.org';
my $tool = 'upload