我有一个像这样的条目的文件:
@HWI-ST750:151:C1C6AACXX:8:1101:10000:14114/1
AAACATACCATTGCATATTTCGTATAATTCGAATTTAAGCAAGTTGTATTGCCAACAGCTCAGATCAATTAAGAATCTTTTCAAATTTATCAATTTA
+/1
DDHBFHHIAHHJEGJFGICHG;CGHGIJIIAIHHIJIGAGIE9FDFHGHG:4???BBC@8=;@FHI:DACHE>>AEAA@;B@;)6(>AC@>35@DDC
@HWI-ST750:151:C1C6AACXX:8:1101:10000:37802/1
GTTCCTTTACTTGCTCCCATGTCCCAATCTAACACACATGAGTCGTCGCACGCCAGTAAATCTAAAGATTTCAGACACTCAGACTCGTACAGTGAAA
+/1
FHHHHHJJIJJJJJJJJJJJJIJJJIJJJJJJJJJJJIHJIJ@GIHIIJJJIJHGHFFFFFFEEDEEEEDDDDDDDDDCDDCCCDDDABBDD>CC>A
我想从第 1 个字到第 45 个字的每 2 行删减一次。所以我使用了以下命令:
sed "0~2p" BT8_A.fastq | cut -c1-45 | head -n 12
它工作正常,但在切割第 45 个单词后,同一行被附加到下一行。像这样 -
@HWI-ST750:151:C1C6AACXX:8:1101:10000:14114/1
AAACATACCATTGCATATTTCGTATAATTCGAATTTAAGCAAGTT
AAACATACCATTGCATATTTCGTATAATTCGAATTTAAGCAAGTT
+/1
DDHBFHHIAHHJEGJFGICHG;CGHGIJIIAIHHIJIGAGIE9FD
DDHBFHHIAHHJEGJFGICHG;CGHGIJIIAIHHIJIGAGIE9FD
@HWI-ST750:151:C1C6AACXX:8:1101:10000:37802/1
GTTCCTTTACTTGCTCCCATGTCCCAATCTAACACACATGAGTCG
GTTCCTTTACTTGCTCCCATGTCCCAATCTAACACACATGAGTCG
+/1
FHHHHHJJIJJJJJJJJJJJJIJJJIJJJJJJJJJJJIHJIJ@GI
FHHHHHJJIJJJJJJJJJJJJIJJJIJJJJJJJJJJJIHJIJ@GI
我无法解决这个问题。我在这里哪里出错了。帮我。
谢谢你。
我想要的输出是:
@HWI-ST750:151:C1C6AACXX:8:1101:10000:14114/1
AAACATACCATTGCATATTTCGTATAATTCGAATTTAAGCAAGTT
+/1
DDHBFHHIAHHJEGJFGICHG;CGHGIJIIAIHHIJIGAGIE9FD
@HWI-ST750:151:C1C6AACXX:8:1101:10000:37802/1
GTTCCTTTACTTGCTCCCATGTCCCAATCTAACACACATGAGTCG
+/1
FHHHHHJJIJJJJJJJJJJJJIJJJIJJJJJJJJJJJIHJIJ@GI