in reply to Re: HTML coded for in PERL
in thread HTML coded for in PERL

Yes Sorry.

The $counter is as it sounds a counter, whcih is taken from an external sub foreach loop.
The $recSite is a string variable showing the recognition site for an enzyme cleavage location i.e G^ATATGAG.
The $anotate is another string that shows the binding site of an enzyme in a DNA sequence i.e AGTATACGTTCAACGCA
The @cut is an array of fragments cut by the enzyme at the $recSite position, highlighted by the $anotate sequence.

Replies are listed 'Best First'.
Re^2: HTML coded for in PERL
by davidrw (Prior) on May 18, 2005 at 17:13 UTC
    Right, but what are the exact values (especially for @cut)? Can you provide the actual generated HTML that's too wide? I suspect (as some of the other responders have, too) that @cut has some big long chunk of whitespace-less text in it.
      The output for @ cut would be something like
      Digested:AGCTGACGTCG AATTCGCAGGTCAGTACTACGTCGAGTACGGTACTGGACGTACGTGCAT +GTGTGTACGTGACTTACGTGACTGATCGATCGACGTAGCTGTTGTGTACTACTATCGATCGTACTTACT +GATGCTATATATTAGCGCGCTGCGTAGCTAGTCGCTATCGTGA
        Yea, you'll definitely need to insert some whitespace in that thing if you want it to break in HTML.

        Transient, davidrw, and frodo72 are correct. The lack of whitespace is causing the browser stretch. In fact, your sample output caused this very page to stretch until i edited your post and added <code> tags. Try something like this to add spaces at every, say 25 characters:

        s/(.{25})/$1 /g for @cut;
        I would then use a bulleted list to display the elements of @cut, to make sure that whomever is reading the HTML page does not think they are seperate elements.
        print "<ul>\n"; print "<li>$_</li>\n" for @cut; print "</ul>\n";
        Although i'd much rather use something like HTML::Template.

        jeffa

        L-LL-L--L-LL-L--L-LL-L--
        -R--R-RR-R--R-RR-R--R-RR
        B--B--B--B--B--B--B--B--
        H---H---H---H---H---H---
        (the triplet paradiddle with high-hat)