因在网站上查询基因序列后 保存下的文件为一个总文件 为方便分析与查找 总文件要分割成小文件 文件分割器不能按自己的要求分割 就只能自己编写程序... 汗 不会 呵呵 只有想各位求援了 具体序列放附件里面了 要分割为单个的 如: >gi|1532267|gb|U68521.1|HIVU68521 HIV-1 sample 9939 patient 10 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAGTTAGATAAATGGGAAAGAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTGGCCTTTTAGAAACATCAGAAGGCTGTAGACAAATACTGGGACAGCTACAACCAGCCCTTCAGACA GGATCAGAAGAACTTAAATCATTACATAATACAGTAGCAGTCCTCTATTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAGAAAATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAAGCACAGCA
晕 不能上传 序列 >gi|1532267|gb|U68521.1|HIVU68521 HIV-1 sample 9939 patient 10 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAGTTAGATAAATGGGAAAGAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTGGCCTTTTAGAAACATCAGAAGGCTGTAGACAAATACTGGGACAGCTACAACCAGCCCTTCAGACA GGATCAGAAGAACTTAAATCATTACATAATACAGTAGCAGTCCTCTATTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAGAAAATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAAGCACAGCA AGCAGCAGCTGACACAGGAAACAACAGCCAGGTCAGCCAAAATTACCCTATAGTGCAGAACCTTCAGGGG CAAATGGTA
>gi|1532263|gb|U68519.1|HIVU68519 HIV-1 sample 256 patient 9 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTAGCCTTTTAGAGACATCAGAAGGCTGTAGACAAATACTGGGACAGCTACAACCGGCCCTTCAGACA GGATCAGAAGAACTTAAATCATTACATAATACAGTAGCAGTCCTCTATTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAGAAGATAGAGGAAGAGCAAAACAAAAGCAAGAAAAAGGCACAGCA AGCAGCAGCTGACACAGGAAACAACAGCCAGGTCAGCCAAAATTACCCTATAGTGCAGAACCTCCAGGGG CAAATGGTA
>gi|1532259|gb|U68517.1|HIVU68517 HIV-1 sample 159 patient 8 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAATTAGATAGATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGAAGGGAGCTAGAACGATTCGMAGTTAA TCCTGGCCTTTTAGAGACATCAGAAGGTTGTAGACAAATACTGGGACAGCTACAGCCATCCCTTCAGACA GGATCAGAAGAACTTAAATCATTACATAATACAGTAGCAGTCCTCTATTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGACAAAATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAAGCACAGCA AGCAGCAGCTGACACAGGAAACAACAGCCAGGTCAGTCAAAATTACCCTATAGTGCAGAACCTTCAGGGG CAAATGGTA
>gi|1532257|gb|U68516.1|HIVU68516 HIV-1 sample 6760 patient 7 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAGGAAAAAGTATAAATTAAAACATCTAGTATGGGCAAGCAGGGAGCTAGAACGATATGCAGTTAA TCCTGGCCTTTTAGAGACATCAGAAGGCTGTAGACAAATATTAGGACAGCTACAACCAGCCATTCAGACA GGATCAGAAGAACTTAAATCATTATATAATACAGTAGTAACCCTCTACTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGACAAGGTAGAGGAAGAACAAAACAAAAGTAAGAAAAAAGCACAGCA AGCAGCAGCTGACACAGGAAACAGCGGCAAGGTCAGCCAAAATTTCCCTATAGTGCAGAACCTACAGGGG CAAATGGTA
>gi|1532255|gb|U68515.1|HIVU68515 HIV-1 sample 6767 patient 6 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTACGGCCAG GGGGAAAGAAAAAATATCAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTGGCCTTTTAGAGACATCAGAAGGCTGTAGACAAATATTGGGACAGTTACAACCATCCCTTCAGACA GGATCAGAAGAACTTAAATCATTATATAATACAGTAGCAACCCTCTATTGTGTGCATCAAAAGATAGATA TAAAAGACACCAAGGAAGCTTTAGAGAAGATAGAGGAAGAGCAAAACAAATGTAAGAAAAAGGCACAGCA AGCCGCTGCTAACACAGGAAGCAGCAGCCAGGTCAGCCAAAATTACCCTATAGTGCAGAACCTCCAGGGG CAAATGGTA
>gi|1532253|gb|U68514.1|HIVU68514 HIV-1 sample 317 patient 5 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTACTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATCAATTAAAACATCTAGTATGGGCAAGCAGGGAGCTAGAACGATTCTCAATTAA TCCTGGTCTTTTAGAGACATCAGAAGGCTGTAGACAAATATTGAGACAGCTACAACCATCCCTTCAGACA GGATCAGAAGAACTTAAATCATTATATAATACAGTAGCAGTCCTCTATTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAAAAGATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAGGCACAGCA AGCAGCAGCTGACACAGGAAACAGCAGCCAGGTCAGCCAAAATTACCCTATAGTGCAGAACCTCCAGGGG CAAATGGTA
>gi|1532249|gb|U68512.1|HIVU68512 HIV-1 sample 105 patient 3 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTGGCCTTTTAGAGACATCAGAAGGCTGTAGACAAATATTGGGACAGCTACAACCAGCCCTTCAGACA GGATCAGAAGAACTTAGATCATTATATAATACAGTAGCAACCCTCTATTGTGTACATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAGAAGATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAAGCACAGCA AGCAGCAGCTGACACAGGAAGCAGCAGCCAGGTCAGCCAAAATTACCCTATAGTGCAGAACTTACAGGGG CAAATGGTA
>gi|1532247|gb|U68511.1|HIVU68511 HIV-1 sample 135 patient 2 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCAGTATTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTGGCCTTTTAGAGACATCAGAAGGCTGTAGACAAATATTGGGACAGCTACAACCAGCCCTTCAGACA GGATCAGAAGAACTTAAATCATTATATAATACAGTAGCAACCCTCTATTGTGTACATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAGAAGATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAGGCACAGCA AGCAGCAGCTGACACAGGAAGCAGCAGCCAGGTCAACCAAAATTACCCTATAGTGCAGAACTTACAGGGG CAAATGGTA
>gi|1532243|gb|U68509.1|HIVU68509 HIV-1 sample 136 patient 1 from Sweden matrix protein (gag) gene, p17 region, partial cds ATGGGTGCGAGAGCGTCRGTATTAAGCGGGGGAGAATTAGATAAATGGGAAAAAATTCGGTTAAGGCCAG GGGGAAAGAAAAAATATAAATTAAAACATATAGTATGGGCAAGCAGGGAGCTAGAACGATTCGCAGTTAA TCCTGGCCTTTTAGAGACATCAGAAGGCTGTAGACAAATATTGGGACAGCTACAACCATCCCTTCAGACA GGATCAGAAGAACTTAGATCATTATATAATACAGTAGCAGTCCTCTATTGTGTGCATCAAAGGATAGATG TAAAAGACACCAAGGAAGCTTTAGAGAAGATAGAGGAAGAGCAAAACAAAAGTAAGAAAAAGGCACAGCA AGCAGCAGCCGCAGCAGCTGACACAGGAAACAGCAGYCAGGTCAGCCAAAATTACCCTATAGTGCAGAAC CTACAGGGGCAAATGGTA 写了个批处理的 因为这个分割在上100个序列以上时候反映时间太慢 希望大家帮忙修改下 让它更精简方便
@Echo Off color 0A Echo 序列分析中,根据计算机配置不同和序列长短不一,可能需要几分钟,请耐心等待。。。 Echo ================================================================================ for /f "delims=| tokens=1,2*" %%i in (sequences.fasta) do (if "%%j"=="" (echo %%i %%i) else (echo %%i%%j %%i^|%%j^|%%k))>>a setlocal EnableDelayedExpansion for /f "delims= tokens=1*" %%i in (a) do ( set line=%%i set line=!line:^>=p ! for /f "tokens=1,2" %%s in ("!line!") do if "%%s"=="p" (echo %%s %%t %%i%%j) else (echo %%i))>>b echo y>c for /f "eol=; tokens=1,2,3*" %%i in (b) do if "%%i"=="p" (type c>>d & echo y %%j>c & echo %%i %%l>>d) else (echo w %%i)>>d type c>>d for /f "skip=1 tokens=1,2*" %%i in (d) do if "%%i"=="y" (ren temp %%j.txt) else ((if "%%k"=="" (echo %%j) else (echo %%j %%k))>>temp) del a b c d
|