Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Convert Chunk of Data into Tabular Format

by neversaint (Deacon)
on Apr 01, 2010 at 01:41 UTC ( [id://832180]=perlquestion: print w/replies, xml ) Need Help??

neversaint has asked for the wisdom of the Perl Monks concerning the following question:

Dear Masters,
I have a data that looks like this
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 emb +ryos(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
Is there a compact way to convert them into tabular format (tab separated). Hence 1 entry/row per chunk. In these case 3 rows.

---
neversaint and everlastingly indebted.......

Replies are listed 'Best First'.
Re: Convert Chunk of Data into Tabular Format
by GrandFather (Saint) on Apr 01, 2010 at 01:46 UTC

    Show us at least a sample of the output you want. Although if you are really keen for help, show us the code you have tried so far and tell us where you are having trouble with it.


    True laziness is hard work
Re: Convert Chunk of Data into Tabular Format
by BrowserUk (Patriarch) on Apr 01, 2010 at 02:54 UTC

    Assuming the data is in a file:

    perl -laF/\n/ -000ne"print join chr(9),@F" theFile
Re: Convert Chunk of Data into Tabular Format
by Anonymous Monk on Apr 01, 2010 at 01:46 UTC
    Is there a compact way to convert them into tabular format (tab separated)

    Yes there is.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://832180]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found