Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

hello! becuase you mentioned about "CDS", "original", so I guess you want parser information from a genbank format file, right? (e.g. as cavac say, if you do not offer file format, other people can't understand what do you want to do, and then understand wether the code work good. so I can't offer how to make your code work correctly, too.

there are some part of your maybe need change, I just try to give some advice:)

@cds = (@cds, $content[$start]); print @cds;

before this paragraph, @cd did not defined in anywher, so this will make script stop work, and because it assigned by itself, I can't understand purpose of this statements, so I don't know how to modify it, but I sure it won't work now.

for ($start;$start <= $index_max; $start++) { @origin = (@origin, $content[$start]); shift (@origin); #Delete ORIGIN row; print @origin; for @origin {

this part have same problem, what is @origin?

#This chromosome have tags. Identify CDS ones. my @features =$mySeq ->all_seqfeatures(); foreach $feature (@features) { my @tag = $CDS; my @feat = $join; foreach $tag ( $feat->all tags() ); print "Feature region has tag", $tag, "CDS", join( ,$feat->each tag value($tag)), "\n"; }

I guess you defined subroutines in other site, so I don't what can they do, ;-;.

open(my $file, '<', $file_name) or die "Sorry, we can't open your $fil +; open (WRITE, ">>concatenare.txt");

you used two style of open() in this code, first is better, please use it every times.

you can use  while(my $line = <$fh>){...}, this will read one line of file in each times. so you don't need read all content into a array, and don't need to find the last index before. if you actually treat a very big file, it will reduce ram occupied by program.

p.s. yes, Bioperl can resolve most of problem.

In reply to Re: Stuck in Perl.. Partial code, but it needs more improvement.. Any suggestions, please? by glycine
in thread Stuck in Perl.. Partial code, but it needs more improvement.. Any suggestions, please? by cosmin

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-15 06:58 GMT
Find Nodes?
    Voting Booth?

    No recent polls found