Sponsored Content
Top Forums Shell Programming and Scripting Need help comparing Base Pairs within PERL Post 302651887 by drossy on Wednesday 6th of June 2012 10:09:43 AM
Old 06-06-2012
I still don't believe I am explaining it correctly:
The index number for the given data must match that of the reference.
Data:
Code:
Index      Chr       Genotype   Mutation Type
1           Chr1           TT            Intronic
2           Chr1           AA            Exonic
3           Chr1           AG            Exonic
4           Chr1           CC            Frameshift
5           Chr1           CA            Intronic


Reference:
Code:
1)T
2)A
3)C
4)G
5)C

For example: The genotype at position 1 is TT and the reference is T. Because atleast one of the letters in the genotype matches the reference, then the program should move on.
At position 3, the genotype is AG and the reference is C. Neither of the letters that make up the genotype match the reference, so the program should take note of this and display '3 Chr1 AG Exonic' in the output.

Thanks again

Moderator's Comments:
Mod Comment edit by bakunin: please use [CODE]..[/CODE]-tags ehen posting code or file content. It makes it easier to read and it stays formatted. Thank you.

Last edited by bakunin; 06-07-2012 at 03:56 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl search and replace pairs

Hello all im facing some kind of problem i have this string : functionA() $" "$ functionB("arg1") $" = "$ i will like to replace all the pairs of opening and closing "$" to be something like that functionA() <#" "#> functionB("arg1") <#" = "#> i cant of course do is with simple ... (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Comparing Variables in Perl

Hi. I have three arrays. @a=('AB','CD','EF'); @b=('AB,'DG',HK'); @c=('DD','TT','MM'); I want to compare the elements of the first two array and if they match then so some substition. I tried using the if statement using the scalar value of the array but its not giving me any output. ... (7 Replies)
Discussion started by: kamitsin
7 Replies

3. Shell Programming and Scripting

Comparing arrays in perl

Hi all, I am trying to compare two arrays in perl using the following code. foreach $item (@arrayA){ push(@arrayC, $item) unless grep(/$item/, @arrayB); ... (1 Reply)
Discussion started by: chriss_58
1 Replies

4. Shell Programming and Scripting

PERL name value pairs substituions

I have a main file with variable tokens like this: name: File1 =========== Destination/Company=@deploy.company@ Destination/Environment=@deploy.env@ Destination/Location=@deploy.location@ Destination/Domain=@deploy.location@ MIG_GatewayAddresses=@deploy.gwaddress@ MIG_URL=@deploy.mig_url@... (1 Reply)
Discussion started by: uandme2k2
1 Replies

5. Shell Programming and Scripting

comparing list values in Perl

Hi, I have tab separated list: KB0005 1019 T IFVATVPVI 0.691 PKC YES KB0005 1036 T YFLQTSQQL 0.785 PKC YES KB0005 1037 S FLQTSQQLK 0.585 DNAPK YES KB0005 508 S ENIISGVSY 0.507 cdc2 YES KB0005 511 S ... (1 Reply)
Discussion started by: karla
1 Replies

6. Shell Programming and Scripting

PERL: simple comparing arrays question

Hi there, i have been trying different methods and i wonder if somebody could explain to me how i would perform a comparison on two arrays for example my @array1 = ("gary" ,"peter", "paul"); my @array2 = ("gary" ,"peter", "joe"); I have two arrays above, and i want to something like this... (5 Replies)
Discussion started by: hcclnoodles
5 Replies

7. Shell Programming and Scripting

Perl: Comparing to two files and displaying the differences

Hi, I'm new to perl and i have to write a perl script that will compare to log/txt files and display the differences. Unfortunately I'm not allowed to use any complied binaries or applications like diff or comm. So far i've across a code like this: use strict; use warnings; my $list1;... (2 Replies)
Discussion started by: dont_be_hasty
2 Replies

8. Shell Programming and Scripting

Perl: Need help comparing huge files

What do i need to do have the below perl program load 205 million record files into the hash. It currently works on smaller files, but not working on huge files. Any idea what i need to do to modify to make it work with huge files: #!/usr/bin/perl $ot1=$ARGV; $ot2=$ARGV; open(mfileot1,... (12 Replies)
Discussion started by: mrn6430
12 Replies

9. Shell Programming and Scripting

Need help in comparing two files using shell or Perl

I have these two file that I am trying to compare using shell arrays. I need to find out the changed or the missing enteries from File2. For example. The line "f nsd1" in file2 is different from file1 and the line "g nsd6" is missing from file2. I dont want to use "for loop" because my files... (2 Replies)
Discussion started by: sags007_99
2 Replies

10. Shell Programming and Scripting

Perl for comparing numbers from previous lines in a file?

Hi everyone I have a question for you, as I am trying to learn more about Perl and work with some weather data. I have an ascii file (shown below) that has 10 lines with different columns. What I would like is have Perl find an "anomalous" value by comparing a field with the values from the last... (2 Replies)
Discussion started by: lucshi09
2 Replies
Bio::PopGen::GenotypeI(3pm)				User Contributed Perl Documentation			       Bio::PopGen::GenotypeI(3pm)

NAME
Bio::PopGen::GenotypeI - A marker and alleles for a specific individual SYNOPSIS
Give standard usage here DESCRIPTION
Describe the interface here FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via email or the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - Jason Stajich Email jason-at-bioperl.org APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ marker_name Title : marker_name Usage : my $name = $genotype->marker_name(); Function: Get the marker name for a genotype result Returns : string Args : none individual_id Title : individual_id Usage : my $indid = $genotype->individual_id(); Function: Gets the individual id associated with a genotype This is effectively a back reference since we will typically associate a genotype with an individual with an individual HAS-A genotype relationship. Returns : unique id string for an individual Args : none annotation Title : annotation Usage : my $annotation_collection = $genotype->annotation; Function: Get/set a Bio::AnnotationCollectionI for this genotype Returns : Bio::AnnotationCollectionI object Args : [optional set] Bio::AnnotationCollectionI object get_Alleles Title : get_Alleles Usage : my @alleles = $genotype->get_Alleles(); Function: Get the alleles for a given marker and individual Returns : array of alleles (strings in many implementations) Args : none perl v5.14.2 2012-03-02 Bio::PopGen::GenotypeI(3pm)
All times are GMT -4. The time now is 08:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy