Extract part of a fasta sequences with ID

Extracting fasta sequences based on position Written By Pierre Lindenbaum


Example FASTA file
>AT1G01250
NNEPTATASAVKSCGGGGKETSSSTTRHPVYHGVRKRRWGKWVSEIREPRKKSRIWLGSFPVPEMAAKAYDVAAFCLKGRKAQLNFPEEIEDLPRPSTCTPRDIQVAAAKAANAVKIIKMGDDDVAGIDDGDDFWEGIELPELMMSGGGWSPEPFVAGDDATWLVDGDLYQYQFMACL

>AT1G03800
MTTEKENVTTAVAVKDGGEKSKEVSDKGVKKRKNVTKALAVNDGGEKSKEVRYRGVRRRPWGRYAAEIRDPVKKKRVWLGSFNTGEEAARAYDSAAIRFRGSKATTNFPLIGYYGISSATPVNNNLSETVSDGNANLPLVGDDGNALASPVNNTLSETARDGTLPSDCHDMLSPGVAEAVAGFFLDLPEVIALKEELDRVCPDQFESIDMGLTIGPQTAVEEPETSSAVDCKLRMEPDLDLNASP
Example ID file
AT1G01250    1    10
AT1G03800    7    16
:
:


 
Extract Part of a FASTA Sequences with Position by python script HERE

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Traceback (most recent call last):
    File "domainseq.py", line 31, in
    print(fasta_dict[line[0]][s:e])
    KeyError: 'NW_019014662.1'

    can you help me

    ReplyDelete

Have Problem ?? Drop a comments here!