Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用python从文件中读取和提取数据_Python - Fatal编程技术网

使用python从文件中读取和提取数据

使用python从文件中读取和提取数据,python,Python,我是python新手,我想从这种格式中提取数据 <seq id> <alignment start> <alignment end> <envelope start> <envelope end> <hmm acc> <hmm name> <type> <hmm start> <hmm end> <hmm length> <bit score> <

我是python新手,我想从这种格式中提取数据

<seq id> <alignment start> <alignment end> <envelope start> <envelope end> <hmm acc> <hmm name> <type> <hmm start> <hmm end> <hmm length> <bit score> <E-value> <significance> <clan>

**FBpp0143497**      **5    151**      5    157 PF00339.22  **Arrestin_N**        Domain     1   135   149     83.4   **1.1e-23**   1 CL0135   
**FBpp0143497**    **183    323**    183    324 PF02752.15  Arrestin_C        Domain     1   137   138     58.5     **6e-16**   1 CL0135   
FBpp0131987     60    280     51    280 PF00089.19  Trypsin           Domain    14   219   219    127.7   3.7e-37   1 CL0124  
>FBpp0143497
 5      151        Arrestin_N     1.1e-23

>FBpp0143497
 183    323        Arrestin_C     6e-16

您可以使用“csv”模块解析文件,使用空格作为分隔符。
请参阅csv.reader的文档

因为这是蛋白质组学数据,您可能会在包中找到专用的解析器

您可以使用split()在空格处分隔项目,然后从返回的列表中打印出所需的值。

请显示到目前为止的代码。这不是“为Me.COM编写代码”的可能副本