sed '1~2s/foo/bar/g' filename
In my case, it was to reformat a Swift output file for use with MAQ:
sed '1~2s/:end1:/:end:/g' run1717_1731_1.end1.pf.fastq > run1717_1731_1.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_1.end2.pf.fastq > run1717_1731_1.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_2.end1.pf.fastq > run1717_1731_2.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_2.end2.pf.fastq > run1717_1731_2.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_3.end1.pf.fastq > run1717_1731_3.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_3.end2.pf.fastq > run1717_1731_3.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_4.end1.pf.fastq > run1717_1731_4.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_4.end2.pf.fastq > run1717_1731_4.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_5.end1.pf.fastq > run1717_1731_5.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_5.end2.pf.fastq > run1717_1731_5.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_6.end1.pf.fastq > run1717_1731_6.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_6.end2.pf.fastq > run1717_1731_6.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_7.end1.pf.fastq > run1717_1731_7.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_7.end2.pf.fastq > run1717_1731_7.end2.pf.fastq.c
sed '1~2s/:end1:/:end:/g' run1717_1731_8.end1.pf.fastq > run1717_1731_8.end1.pf.fastq.c
sed '1~2s/:end2:/:end:/g' run1717_1731_8.end2.pf.fastq > run1717_1731_8.end2.pf.fastq.c
maq fastq2bfq run1717_1731_1.end1.pf.fastq.c run1717_1731_1.end1.pf.bfq &> make_lane1_end1_bfq&
maq fastq2bfq run1717_1731_1.end2.pf.fastq.c run1717_1731_1.end2.pf.bfq &> make_lane1_end2_bfq&
maq fastq2bfq run1717_1731_2.end1.pf.fastq.c run1717_1731_2.end1.pf.bfq &> make_lane2_end1_bfq&
maq fastq2bfq run1717_1731_2.end2.pf.fastq.c run1717_1731_2.end2.pf.bfq &> make_lane2_end2_bfq&
maq fastq2bfq run1717_1731_3.end1.pf.fastq.c run1717_1731_3.end1.pf.bfq &> make_lane3_end1_bfq&
maq fastq2bfq run1717_1731_3.end2.pf.fastq.c run1717_1731_3.end2.pf.bfq &> make_lane3_end2_bfq&
maq fastq2bfq run1717_1731_4.end1.pf.fastq.c run1717_1731_4.end1.pf.bfq &> make_lane4_end1_bfq&
maq fastq2bfq run1717_1731_4.end2.pf.fastq.c run1717_1731_4.end2.pf.bfq &> make_lane4_end2_bfq&
maq fastq2bfq run1717_1731_5.end1.pf.fastq.c run1717_1731_5.end1.pf.bfq &> make_lane5_end1_bfq&
maq fastq2bfq run1717_1731_5.end2.pf.fastq.c run1717_1731_5.end2.pf.bfq &> make_lane5_end2_bfq&
maq fastq2bfq run1717_1731_6.end1.pf.fastq.c run1717_1731_6.end1.pf.bfq &> make_lane6_end1_bfq&
maq fastq2bfq run1717_1731_6.end2.pf.fastq.c run1717_1731_6.end2.pf.bfq &> make_lane6_end2_bfq&
maq fastq2bfq run1717_1731_7.end1.pf.fastq.c run1717_1731_7.end1.pf.bfq &> make_lane7_end1_bfq&
maq fastq2bfq run1717_1731_7.end2.pf.fastq.c run1717_1731_7.end2.pf.bfq &> make_lane7_end2_bfq&
maq fastq2bfq run1717_1731_8.end1.pf.fastq.c run1717_1731_8.end1.pf.bfq &> make_lane8_end1_bfq&
maq fastq2bfq run1717_1731_8.end2.pf.fastq.c run1717_1731_8.end2.pf.bfq &> make_lane8_end2_bfq&
No comments:
Post a Comment