How can I read a textfile into matlab and make it a list?

Posted by Ben Fossen on Stack Overflow See other posts from Stack Overflow or by Ben Fossen
Published on 2010-06-13T23:27:11Z Indexed on 2010/06/13 23:32 UTC
Read the original article Hit count: 414

Filed under:
|
|

I have a textfile that has the format

 gene            complement(22995..24539)
                 /gene="ppp"
                 /locus_tag="MRA_0020"
 CDS             complement(22995..24539)
                 /gene="ppp"
                 /locus_tag="MRA_0020"
                 /codon_start=1
                 /transl_table=11
                 /product="putative serine/threonine phosphatase Ppp"
                 /protein_id="ABQ71738.1"
                 /db_xref="GI:148503929"
 gene            complement(24628..25095)
                 /locus_tag="MRA_0021"
 CDS             complement(24628..25095)
                 /locus_tag="MRA_0021"
                 /codon_start=1
                 /transl_table=11
                 /product="hypothetical protein"
                 /protein_id="ABQ71739.1"
                 /db_xref="GI:148503930"
 gene            complement(25219..26802)
                 /locus_tag="MRA_0022"
 CDS             complement(25219..26802)
                 /locus_tag="MRA_0022"
                 /codon_start=1
                 /transl_table=11
                 /product="hypothetical protein"
                 /protein_id="ABQ71740.1"
                 /db_xref="GI:148503931"

I would like to read the textfile into Matlab and make a list with the information from the line gene as the starting point for each item in the list. So for this example there will be 3 items in the list. I have tried a few things and cannot get this to work. Anyone have any ideas of what I can do?

© Stack Overflow or respective owner

Related posts about matlab

Related posts about import