in reply to Re: Homologene BioPerl
in thread Homologene BioPerl
I can't thank you enough for your help.
So I tried to do what you are saying by downloading the database. I got that far and I have the homologene.data file
[zwc2101|login2] ~/TALL/ref/HomoloGene $ head homologene.data 3 9606 34 ACADM 187960098 NP_001120800.1 3 9598 469356 ACADM 114557331 XP_524741.2 3 9615 490207 ACADM 73960161 XP_547328.2 3 9913 505968 ACADM 115497690 NP_001068703.1 3 10090 11364 Acadm 6680618 NP_031408.1 3 10116 24158 Acadm 8392833 NP_058682.1 3 7955 406283 acadm 47085823 NP_998254.1 3 7227 38864 CG12262 24660351 NP_648149.1 3 7165 1276346 AgaP_AGAP005662 58387602 XP_315683.2 3 6239 181757 acdh-10 17569725 NP_510788.1
I must say though that my "database" skills are not existent, I am good however at parsing and basic unix/perl/ matching etc... So from what you are saying ... the group id number will be the same for each gene (including its homologies should they be named differently) and that I just need to match the everything that has the group id for each human accession number, and then see if any of the lines match any of the Drosophila tax IDs? Thanks again for your help you have helped me tremendously!
Heres my code so far for this#!/usr/bin/perl -w use strict; open (FILEHANDLE,"$ARGV[0]") || die("Could not open OnlyNormal file"); my @homo = <FILEHANDLE> ; close (FILEHANDLE); open (FILEHANDLE, "$ARGV[1]") || die("Could not open input file"); my @file = <FILEHANDLE> ; close (FILEHANDLE); foreach my $line (@homo) { chomp $line; (my $GroupID)=split(/\t/,$line); foreach my $Gene(@file) { chomp $Gene; if ($line =~m/\t$Gene\t/ && $line =~m/9606/) #Human Gene + name and Human Taxid { foreach my $LINE(@homo) { (my @drosophila)=split(/\t/,$LINE); if ($LINE =~m/^$GroupID\t/ && $line =~m/722 +7/) # Gene group ID and Drosophila Tax ID { print $Gene . "\t". $drosophila[3] . +"\n"; # [3] is the Drosophila Gene name at the group ID determined ab +ove } } } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Homologene BioPerl
by erix (Prior) on Dec 02, 2011 at 20:36 UTC |
In Section
Seekers of Perl Wisdom