- 论坛徽章:
- 0
|
文件123.txt 格式如下:
#CHROM ./03.split_sam/p3-100_natural.sort.bam ./03.split_sam/p3-101_natural.sort.bam ./03.split_sam/p3-102_natural.sort.bam ./03.split_sam/p3-103_natural.sort.bam ./03.split_sam/p3-104_natural.sort.bam ./03.split_sam/p3-105_natural.sort.bam ./03.split_sam/p3-106_natural.sort.bam ./03.split_sam/p3-107_natural.sort.bam ./03.split_sam/p3-108_natural.sort.bam
SCAFFOLD00001 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00004 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00007 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00008 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00008 1/1 0/1 0/1 0/0 0/1 0/1 0/1 0/1 1/1
SCAFFOLD00008 1/1 0/1 0/1 0/0 0/1 0/1 0/1 0/1 0/0
SCAFFOLD00008 0/0 0/0 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00008 0/1 0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1
SCAFFOLD00009 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00009 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00010 1/1 0/1 0/0 0/1 0/1 1/1 0/1 0/1 0/1
SCAFFOLD00011 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
将第一行./03.split_sam/p3-xx_natural.sort.bam 替换掉 只保留中间的数字xx,替换后应该是这样的文件456.txt
#CHROM 100 101 102 103 104 105 106 107 108
SCAFFOLD00001 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00004 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00007 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00008 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00008 1/1 0/1 0/1 0/0 0/1 0/1 0/1 0/1 1/1
SCAFFOLD00008 1/1 0/1 0/1 0/0 0/1 0/1 0/1 0/1 0/0
SCAFFOLD00008 0/0 0/0 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00008 0/1 0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1
SCAFFOLD00009 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00009 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
SCAFFOLD00010 1/1 0/1 0/0 0/1 0/1 1/1 0/1 0/1 0/1
SCAFFOLD00011 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
请问如何替换?请指教,谢谢! |
|