Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JohnLucania

    Output generation with loop on the fly

    while ( my @rids = $fac->each_rid ) { die "No record found\n" unless @rids; foreach my $rid ( @rids ) { my $result = $fac->retrieve_blast( $rid ); if( ref( $result )) { my $output = $result->next_result(); my $filename = $output->query_name().".out"; $filename...
  2. JohnLucania

    pod format

    What is the recommened/common pod format/template in practice? Of course, they will vary, but in general? I have an example: =pod =head1 NAME Debugging mod_perl Perl Internals =head1 Description This document explains how to debug Perl code under mod_perl. =head1 Maintainers Maintainer...
  3. JohnLucania

    Can't modify constant item in scalar assignment

    What is this error about and how to fix? Can't modify constant item in scalar assignment at line 16, near "}" #! /usr/bin/perl use strict; use warnings; package Protein; our %attrib; sub new { my( $class , %attribs ) = ( @_ ); my $obj = { _name =...
  4. JohnLucania

    Inserting data

    How do you parse the data (Seq.txt) into a table in mysql? The txt data look like: >AREDD7|Mus musculus|brain|45545|411|741 aagcggccggtctgcagtcggagacttgcaggcagcaaacacggtgcgaacgaaccggag gggggagagagaaatcaaacagctaagcgtggagcagacggcctgggacccagaagggga tcgatgcgaggagcgcaataata...
  5. JohnLucania

    passing to query

    I have a form: <form name="SearchSeq" method="post" action="SearchSeqResult.cgi"> <p><b>GENE NAME:</b> <select name="GENE_NAME"> <option>BRC2_HUMAN</option> bla..... </select> </p> <p><b>ORGANISM NAME:</b> <select...
  6. JohnLucania

    Auto-populating dropdowns from mySQL

    I have a form: #! /usr/bin/perl use warnings; use strict; use CGI ( ':standard' ); my $title = 'Sequence Search'; my $seq = param( 'Seq' ); print header, start_html( $title ), h1( $title ),<<"PrintTag",end_html; <form name="SearchSeq" method="post" action="SearchSeqResult.cgi"> <p>...
  7. JohnLucania

    DBI and ARGV

    use DBI; ........... print "Enter the Gene Name: \n"; $ARGV[0] = <STDIN>; print "Enter the organism: \n"; $ARGV[1] = <STDIN>; print "Enter the exp level: \n"; $ARGV[2] = <STDIN>; .............. my $st = "SELECT GENE.GENE_NAME, ORGANISM.ORGANISM_NAME, MRNA.MRNA_EXPRESSION_LEVEL"; $st .=...
  8. JohnLucania

    Diff w/ or w/o ' '

    use Test::Simple tests print "Enter sequences: "; chomp(@CheckChar= <STDIN>); // when ‘abd’ (please note ‘ ‘) is entered, it gives me. ok( grep(/abd|ABD/i, @CheckChar), "A word, 'abd', checks" ); ok 1 - A word, 'abd', checks // when abd (please note w/o ‘ ‘) is entered, it gives me ‘Failed...
  9. JohnLucania

    use Test::Simple

    sub CheckSeq { return scalar grep /[^abceABCE]/, @CheckChar; } For this, I tried both below. What is wrong with it? ok( @CheckChar =~ /[^abceABCE]*@/, "sequence composition checks" ); ok( @CheckChar =~ /[^abceABCE]/, "sequence composition checks" ); grep(/abd|ABD/i, @CheckChar ); Also, how...
  10. JohnLucania

    die ( )

    How do you put die () in this case? if !CheckSeq (); then, sub 2nd and sub 3rd don’t need to be called and don’t need to print. sub CheckSeq { return scalar grep /[abceABDE]/, @SeqChar; } sub 2nd{ } sub 3rd { } print "1. Your input contains valid sequence.\n" if CheckSeq ()...
  11. JohnLucania

    calling pm and output

    I put this in a modue. sub trans { my %translate = ( 'uvx' => 'asn', 'uxx' => 'cya', 'yyu' => 'tis', 'xvu' => 'lis' ); for( @SeqChar ){ tr/abce/uvxy/; s/(...)/$translate{$1}/g; print $_,"\n"; } } trans(); 1; How do you get the acutal...
  12. JohnLucania

    uninitialized value in substitution iterator

    my @SeqChar; print "Enter sequences and 'enter' and then Ctrl + D: "; chomp(@SeqChar = <STDIN>); sub trans { my %translate = ( 'aug' => 'asn', 'uag' => 'cya', 'gcu' => 'tis', 'aag' => 'lis', 'atg' => 'phe' ); for( @SeqChar ){ tr/atcg/uagc/...
  13. JohnLucania

    Multiple substitutions

    chomp(@SeqChar = <STDIN>) sub trans { map {tr/abce/uvxy/, print "$_\n"} @SeqChar; } How do you get the strings translated from 'sub trans' and print the corresponding strings on the screen? i.e. if the strings translated are 'uvx' then print 'asn' on the screen if the strings translated...
  14. JohnLucania

    convert str -&gt; str

    chomp(@SeqChar = <STDIN>) will have hundreds of input strings of qw/abce/ How do you convert all of the inputs like below? a -> u b -> v c -> x e -> y
  15. JohnLucania

    logics for array

    #! /usr/bin/perl use strict; use warnings; my @SeqChar; print "Enter sequences and 'enter' and then Ctrl + D: "; chomp(@SeqChar = <STDIN>); sub StartChar { my $abc; $abc+= /(abc|ABC)/g for @SeqChar; return $abc } print "\n"; print "Yes, your input contains a seq char (abc).\n" if...
  16. JohnLucania

    &lt;STDIN&gt; for array

    #! /usr/bin/perl use strict; use warnings; my @SeqChar; chomp(@SeqChar = <STDIN>); sub is_invalid_list { return scalar grep /[^a-dA-D]/, @SeqChar; } print "Yes\n" if is_invalid_list( qw/yes daad cab/ ); Why is it not returning anything? jl
  17. JohnLucania

    matrix w/ array

    #! /usr/bin/perl use strict; use warnings; my @ArrayNum = (1,2,3,4,5,6,7,8,9); How do you display the numbers in matrix like below? matrix 1) 1 2 3 4 5 6 7 8 9 matrix 2) 1 4 7 2 5 8 3 6 9 jl
  18. JohnLucania

    Extra output from Array

    #! /usr/bin/perl use warnings; use strict; my @array = (1 .. 100); sub NumAscOrder { @array = sort {$a <=> $b} (@array); print "@array\n"; } sub NumDescOrder { @array = sort {$b <=> $a} (@array); print "@array\n"; } print "From largest to smallest: \n"; print...
  19. JohnLucania

    errors with explicit package name

    #! /usr/bin/perl use warnings; use strict; use CGI (':standard'); my $title = '1000 Sequences'; print header, start_html( $title ), h1( $title ); sub random_dna { my $length = shift; my @charlist = ( 'A' , 'C' , 'T', 'G' ); my $random; $random .= $charlist[ int rand(...
  20. JohnLucania

    regexp issue

    I am seeing two issues: 1) the 1st entry doesn't get any regexp checked. Enter Number: 100 2) regexps are not matching correctly. Enter Number or 'exit' to exit: 100 100 is a whole number 100 is an integer 100 is a +/- integer 100 is a real number 100 is a decimal number 100 a C float Enter...

Part and Inventory Search

Back
Top