如何用分组读取文本文件中的行?
python分组读取文件
FALSE | high | master | A0A0D9SF54 | Spectrin alpha chain, non-erythrocytic 1 OS=Homo sapiens OX=9606 GN=SPTAN1 PE=1 SV=1 | 1450.135 |
Checked | Confidence | Annotated Sequence | Qvality PEP | Qvality q-value | |
yes | High | [R].YFGPNLLNTVK.[Q] | 0.00093326 | 0.00011495 | |
Checked | Avg. m/z [Da] | Charge | Max. Apex S/N | ||
yes | 633.34577 | 2 | 8.41 | ||
Checked | Confidence | Annotated Sequence | Qvality PEP | Qvality q-value | |
yes | High | [R].YFGPNLLNTVK.[Q] | 0.00093326 | 0.00011495 | |
Checked | Avg. m/z [Da] | Charge | Max. Apex S/N | ||
yes | 633.34577 | 2 | 8.41 | ||
FALSE | high | master | P10809 | Spectrin alpha chain, non-erythrocytic 1 OS=Homo sapiens OX=9606 GN=SPTAN1 PE=1 SV=1 | 1450.135 |
Checked | Confidence | Annotated Sequence | Qvality PEP | Qvality q-value | |
no | High | [R].YFGPNLLNTVK.[Q] | 0.00093326 | 0.00011495 | |
Checked | Avg. m/z [Da] | Charge | Max. Apex S/N | ||
no | 633.34577 | 2 | 8.41 | ||
FALSE | high | master | P62487 | Spectrin alpha chain, non-erythrocytic 1 OS=Homo sapiens OX=9606 GN=SPTAN1 PE=1 SV=1 | 1450.135 |
Checked | Confidence | Annotated Sequence | Qvality PEP | Qvality q-value | |
no | High | [R].YFGPNLLNTVK.[Q] | 0.00093326 | 0.00011495 | |
Checked | Avg. m/z [Da] | Charge | Max. Apex S/N | ||
yes | 633.34577 | 2 | 8.41 | ||
Checked | Avg. m/z [Da] | Charge | Max. Apex S/N | ||
yes | 633.34577 | 2 | 8.41 |
这是一个分级的表格,每行开头是FALSE的为每组第一行,后面跟着的开头为单元格为空的是该组下的数据。每组分为两级(开头每空一个单元格为一级)。每组第一行的第四个单元格为唯一的accession number。
现在想要分别读出每个单元格的内容进行操作,问使用python有哪些方法可以进行读取?
以上是 如何用分组读取文本文件中的行? 的全部内容, 来源链接: utcz.com/p/937715.html