我有一个看起来像这样的数据
1:SRX000566
Submitter: WoldLab
Study: RNASeq expression profiling for ENCODE project(SRP000228)
Sample: Human cell line GM12878(SRS000567)
Instrument: Solexa 1G Genome Analyzer
Total: 4 runs, 62.7M spots, 2.1G bases
Run #1: SRR002055, 11373440 spots, 375323520 bases
Run #2: SRR002063, 22995209 spots, 758841897 bases
Run #3: SRR005091, 13934766 spots, 459847278 bases
Run #4: SRR005096, 14370900 spots, 474239700 bases
2:SRX000565
Submitter: WoldLab
Study: RNASeq expression profiling for ENCODE project(SRP000228)
Sample: Human cell line GM12878(SRS000567)
Instrument: Solexa 1G Genome Analyzer
Total: 3 runs, 51.2M spots, 1.7G bases
Run #1: SRR002052, 12607931 spots, 416061723 bases
Run #2: SRR002054, 12880281 spots, 425049273 bases
Run #3: SRR002060, 25740337 spots, 849431121 bases
3:SRX012407
Submitter: GEO
Study: GSE17153: Illumina sequencing of small RNAs from C. elegans embryos(SRP001363)
Sample: Caenorhabditis elegans(SRS006961)
Instrument: Illumina Genome Analyzer II
Total: 1 run, 3M spots, 106.8M bases
Run #1: SRR029428, 2965597 spots, 106761492 bases
是否有一种紧凑的方法可以将它们转换为表格格式(制表符分隔)。 因此每个 block 1 个条目/行。在这些情况下为 3 行。
我试过了,但似乎不起作用。
perl -laF/\n/ `-000ne"print join chr(9),@F" myfile.txt`
最佳答案
perl -lanF"\n" -000 -e 'print join "\t", @F' file
关于linux - 使用 Perl 将数据 block 转换为表格格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2558566/