Perl  -flat file  refGene.txt  i need to analyze this file in order:split in coloms and lines in order to make selection i need colums like C9, C10 and C15 last colum is an array with n elements

Posted on 2009-02-15
Last Modified: 2012-05-06
I have the flat file refGene.txt like this and i need to analyze this file in order:- iit needs to be split in coloms and lines

                                    some of the colums like C9, C10 and C15 last colum is an array with n elements

Question by:Malna2009
    LVL 84

    Accepted Solution

    # I am trying to understand the description in that file, but I am getting confused,
    #are you asking for something like this?

    while( <DATA> ){
        next unless (@C=split)>=14;
        print join"_", "\u$C[3]",
        (split/,/,$C[8])[(grep $_>0,split/,/,$C[-1])[0]],

    LINE1  1643     NM_016459       chr5    +       138751155       138753504       138751352       1387534444138751155,138751608,138752048,138753267,                   138751509,138751719,138752173,138753504,     0MGC29506 cmpl    cmpl            -1,2,0,0,

    Author Closing Comment

    Oleber gave me the solution
    LVL 10

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now