我有以下fasta文件:
'>gi|277456704|dbj|ID_P|Gene name LLL
MDGFAGSLDDSISAASTSDVQDRLSALESRVQQQEDEITVLKAALADVLRRLAISEDHVASVKKSVSSKV
YRRKHQELQAMQMELQSPEYKLSKLRTSTIMTDYNPNYCFAGKTSSISDLKEVPRKNITLIRGLGHGAFG
EVYEGQVSGMPNDPSPLQVAVKTLPEVCSEQDELDFLMEALIISKFNHQNIVRCIGVSLQSLPRFILLEL
MAGGDLKSFLRETRPRPSQPSSLAMLDLLHVARDIACGCQYLEENHFIHRDIAARNCLLTCPGPGRVAKI
GDFGMARDIYRASYYRKGGCAMLPVKWMPPEAFMEGIFTSKTDTWSFGVLLWEIFSLGYMPYPSKSNQEV
LEFVTSGGRMDPPKNCPGPVYRIMTQCWQHQPEDRPNFAIILERIEYCTQDPDVINTALPIEYGPLVEEE
'>gi|27704|dbj|ID_Y|Gene name JJJ
MDGFAGSLDDSISAASTSDVQDRLSALESRVQQQEDEITVLKAALADVLRRLAISEDHVASVKKSVSSKG
SELRGGYGDPGRLPVGSGLCSASRARLPGHVAADHPPAVYRRKHQELQAMQMELQSPEYKLSKLRTSTIM
TDYNPNYCFAGKTSSISDLKEVPRKNITLIRGLGHGAFGEVYEGQVSGMPNDPSPLQVAVKTLPEVCSEQ
DELDFLMEALIISKFNHQNIVRCIGVSLQSLPRFILLELMAGGDLKSFLRETRPRPSQPSSLAMLDLLHV
ARDIACGCQYLEENHFIHRDIAARNCLLTCPGPGRVAKIGDFGMARDIYRASYYRKGGCAMLPVKWMPPE
'>gi|2097704|dbj|ID_X|Gene name X
MDGFAGSLDDSISAASTSDVQDRLSALESRVQQQEDEITVLKAALADVLRRLAISEDHVASVKKSVSSKG
QPSPRAVIPMSCITNGSGANRKPSHTSAVSIAGKETLSSAAKSGTEKKKEKPQGQREKKEESHSNDQSPQ
IRASPSPQPSSQPLQIHRQTPESKNATPTKSIKRPSPAEKSHNSWENSDDSRNKLSKIPSTPKLIPKVTK
TADKHKDVIINQEGEYIKMFMRGRPITMFIPSDVDNYDDIRTELPPEKLKLEWAYGYRGKDCRANVYLLP
TGEIVYFIASVVVLFNYEERTQRHYLGHTDCVKCLAIHPDKIRIATGQIAGVDKDGRPLQPHVRVWDSVT
LSTLQIIGLGTFERGVGCLDFSKADSGVHLCVIDDSNEHMLTVWDWQRKAKGAEIKTTNEVVLAVEFHPT
我想循环通过FASTA,在它遇到的所有“R”上分离蛋白质序列,这将产生肽,然后将肽进行爆破。从blastp获取结果并将blastp结果存储在fasta文件中每个蛋白质ID的单独文件中。 我并不特别关注使用何种语言。我想学习如何做到这一点,以便我可以在它上面构建更多功能。 谢谢!
答案 0 :(得分:6)
使用Biopython,您可以parse the FASTA file加入Sequence个对象,split加“R”,然后BLAST over the internet或run BLAST locally。您可以按SeqRecords获取结果(表示为output them to a FASTA file和iterating over each record。
该文档包含大量代码示例,您可以使用这些示例来拼凑您正在寻找的内容。