Recent content by Mousie

  1. M

    Help with fixing a perl program that averages the columns in file?

    The numbers in the file are: 1 1 1 2 2 2 3 3 3 After I run my script I keep on getting the sum of the columns and not the average. #!/usr/bin/perl $A = 0; $B = 0; $C = 0; $rows = 0; open (file, "sample.txt") ||...
  2. M

    Help fixing a Perl program that reads in a file containing two strings on

    each line, and creates a hash with? the first string as key and second string as value. Below is my code but it is not working when I run it. After running the code is says press any key and continue. use strict; use warnings; my $FILE_PATH="SAMPLE.TXT"; my %hash = get_hash ("$FILE_PATH")...
  3. M

    Help fixing a Perl program that reads in a file containing two strings on

    each line, and creates a hash with? the first string as key and second string as value. Below is my code but it is not working when I run it. After running the code is says press any key and continue. use strict; use warnings; my $FILE_PATH="SAMPLE.TXT"; my %hash = get_hash ("$FILE_PATH")...
  4. M

    Help fixing a Perl program that reads in a file containing two strings on

    each line, and creates a hash with? the first string as key and second string as value. Below is my code but it is not working when I run it. After running the code is says press any key and continue. use strict; use warnings; my $FILE_PATH="SAMPLE.TXT"; my %hash = get_hash ("$FILE_PATH")...
  5. M

    Help fixing a complicated perl program where I must find the restriction

    maps in a FASTA file and then for? every sequence print out a graphical display of the cut sites in the restriction map by printing the sequence and labeling the recognition sites with the enzyme name. I also must use a hash to store the data. I must print out all graphical displays of every...
  6. M

    How would you write a perl program that gets the average of each column of...

    ...numbers in any file? The format is: 1 2 3 4 5 6 6 6 4 4 2 3 4 5 6 Should I make the file name a command line argument?
  7. M

    Help with perl program that mutates a DNA sequence while keeping the same

    base pair distribution and randomly? mutate the sequence 10-20 times to find the similarilty between the mutated and the original DNA sequence by calculating an adhoc score? If it is a purine to purine then the score is +2, pyrimidine to pyrimidine +2, purine to pyrimidine or vice versa -1, and...
  8. M

    How do you create a perl script that mutates a DNA sequence and then randomly...

    ...shuffle the sequence 30-50 times? while maintaining the same base pair distribution and calculates the original and mutated sequence? I first started with the srand operator and then tried to shuffle the DNA sequence and keep the same base pair distribution but I feel totally lost.
  9. M

    Help to fix a perl script that obtains a DNA file with a FASTA sequence and...

    ...randomly shuffle the sequence? while maintaining the overall distribution of bases. Randomly shuffle the sequence 10-20 times. Then measure the similarity between the shuffled sequence versus the original sequence by scoring. (z-scores). Scoring criteria: If a purine was mutated to a...
  10. M

    Help to fix a perl script that obtains a DNA file with a FASTA sequence and...

    ...randomly shuffle the sequence? while maintaining the overall distribution of bases. Randomly shuffle the sequence 10-20 times. Then measure the similarity between the shuffled sequence versus the original sequence by scoring. (z-scores). Scoring criteria: If a purine was mutated to a...
  11. M

    Help with fixing a perl program that takes a DNA sequence file and mutates it...

    ...while keeping the same AG & CT? distribution. Then you must randomly mutate the sequence 10-20 times and find the similarity between the mutated and the original sequence by calculating the adhoc score. Pyrimidine ot pyrimidine get a score of +1, Purines to purine get a score of +2, no change...
  12. M

    Help with fixing a perl script to calculate standard deviation, average, variance,

    and n? my @data = (6, 9, 7, 23, 30, 18); my @data2 = (10, 5, 8, 11); my @data3 = (12, 15, 13, 19, 5, 8, 10); Data_info('Info',@data); Data_info('Info',@data2); Data_info('Info',@data3); sub Data_info{ my($Data_info,@activity) = @_; my ($num)=@Data_info +0; my ($sum)=0; my ($sqsum)=0; foreach $x...
  13. M

    How do you create a Perl Program that asks a user to enter two numbers and assign

    those numbers to selections? in a text and then reverse the text? I think I am supposed to use splice array and the reverse function but it is not coming out properly. Sorry about that.. print "Enter a number:\n"; chomp ($number=<>); print "Enter another number:\n"; chomp ($number=<>)...
  14. M

    How do you perform a perl program that will leave hypens between each item?

    I think I have to use string concatenation inside a foreach loop but am unsure. I need for my items to look similar to this: Yellow-Purple-Red....
  15. M

    How do you write a perl script to determine the number of measurements,

    average, variance, standard deviation? This is the script that I have so far and it is not working. my @data = (6, 9, 7, 23, 30, 18); my @data2 = (10, 5, 8, 11); my @data3 = (12, 15, 13, 19, 5, 8, 10); Data_info('Info',@data); Data_info('Info',@data2); Data_info('Info',@data3); sub Data_info{...
Back
Top