thank you very much sir . can you tell me difference between multigene family and operon<br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 6:28 PM, Javier Herrero <span dir="ltr"><<a href="mailto:jherrero@ebi.ac.uk" target="_blank">jherrero@ebi.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Dear usman Ali<br>
<br>
A gene tree is a representation of the evolution of a given gene.
The gene tree can be annotated such as the nodes of the tree
correspond to speciation and duplication events. Speciation events
lead to alternative copies of the same gene in different lineages,
while duplication events lead to additional copies of the gene in a
particular lineage.<br>
<br>
In Ensembl we provide GeneTrees (see
<a href="http://www.ensembl.org/info/docs/compara/homology_method.html" target="_blank">http://www.ensembl.org/info/docs/compara/homology_method.html</a>)
covering all the species in Ensembl.<br>
<br>
Sometimes, people refer to gene trees as a gene family. However, in
Ensembl the families refer to our "Protein families". These are
groups of similar proteins build from all the Ensembl proteins plus
all the metazoan proteins in UniProt.<br>
<br>
Kind regards<br>
<br>
Javier<br>
<br>
On 13/06/12 14:07, usman Ali wrote:
<blockquote type="cite">sir i want to clear my concept about gene tree. i mean
what is gene tree. <br>
<br>
<div class="gmail_quote">On Tue, Jun 12, 2012 at 11:15 PM,
Christopher Kelly <span dir="ltr"><<a href="mailto:cpjkelly@gmail.com" target="_blank">cpjkelly@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Thank you very much for the
timely and helpful response, Javier.
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Chris<br>
<div><br>
<div>
<div>On 2012-06-11, at 10:03 PM, Javier Herrero wrote:</div>
<br>
<blockquote type="cite">
<div>
<p>Dear Chris</p>
<p>First at all, it seems your script is correct.
See <a href="http://www.ensembl.org/Homo_sapiens/Gene/Family?g=ENSG00000127054;r=1:1246965-1260071" target="_blank">http://www.ensembl.org/Homo_sapiens/Gene/Family?g=ENSG00000127054;r=1:1246965-1260071</a>
for the list of families on the web.</p>
<p>We expect some genes to be part of several
families. This is because we cluster the
proteins, not the genes themselves. In the case
of this gene, there are many different
alternative transcripts that have been
annotated. The richness of annotation comes from
Havana, the group at the Sanger doing the manual
annotation of the genome. In this case, a few of
the transcripts appear as singletons simply
because the resulting protein is not similar
enough to any the other proteins used in this
analysis. The set of proteins we use include all
the Ensembl proteins plus all the metazoan
proteins in UniProt.</p>
<p>If you wish to remove the singleton's, you can
test the number of protein members in the
family. Here is an untested snippet that would
do this:</p>
<p>my $num = grep {$_->source_name eq
"ENSEMBLPEP"} @{$family->get_all_Members}</p>
<p>I hope this helps</p>
<p>Javier</p>
<p>Sent from my Kindle Fire</p>
<br>
<br>
<div style="font-size:10.0pt;font-family:"Tahoma","sans-serif";padding:3.0pt 0in 0in 0in">
<hr style="border:none;border-top:solid #b5c4df 1.0pt">
<b>From:</b> Christopher Kelly <<a href="mailto:cpjkelly@gmail.com" target="_blank">cpjkelly@gmail.com</a>><br>
<b>Sent:</b> Tue Jun 12 01:36:57 GMT+01:00 2012<br>
<b>To:</b> Ensembl developers list <<a href="mailto:dev@ensembl.org" target="_blank">dev@ensembl.org</a>><br>
<b>Subject:</b> [ensembl-dev] Ensembl Compara
Member Objects Associated With Multiple
Single-Member Family Stable IDs<br>
</div>
<br>
<pre style="white-space:pre-wrap;word-wrap:break-word;font-family:sans-serif">Hello all,
I have written a script to fetch all members in the ensembl compara 67 database using the member_adaptor->fetch_all_by_source_genome_db_id() method.
Next the script fetches all families associated with each member that was fetched in the previous step, using family_adaptor->fetch_all_by_Member().
When invoked, the script is passed the genome ids of each species to fetch family/member data for, and uses ENSEMBLGENE as the source for member_adaptor->fetch_all_by_source_genome_db_id.
The script outputs list files for each scaffold, with the stable id of each fetched member placed in its respective scaffold file. In addition, the script outputs a file (families file) containing the stable ids of each family next to the members associated with each family, with singleton members simply placed beside their own stable_id.
Th
e
problem with this script (and where I hope someone can provide guidance) is that, for some genes, the families file list several families. For such genes, the first family listed usually contains members other than that gene, but the subsequent listings are family stable ids that link to families containing only that gene. For example, the following is an excerpt from the families file generated from an the homo_sapiens genome_db:
ENSG00000160087 ENSFM00580000910228
ENSG00000162572 ENSFM00250000001147
ENSG00000131584 ENSFM00250000000926
ENSG00000131584 ENSFM00550000746913
ENSG00000131584 ENSFM00550000756970
ENSG00000169972 ENSFM00250000006052
ENSG00000127054 ENSFM00280000058718
ENSG00000127054 ENSFM00610000969020
ENSG00000127054 ENSFM00610000969699
ENSG00000127054 ENSFM00610000969700
ENSG00000127054 ENSFM00610000969886
ENSG00000127054 ENSFM00610000973240
ENSG00000127054 ENSFM00610000973241
ENSG00000127054 ENSFM00560000783793
ENSG00000127054 ENSFM00610000973242
ENSG00000127054 ENSFM00610000969761
ENSG00000127054 ENSFM00610000973243
Notice that the gene ENSG00000127054 is associated with multiple unique families. When entered into the ensembl genome browser, the first family entry for this gene returns a family with multiple orthologous members (which is expected). However, the subsequent family entries for this same gene, when entered into the ensembl genome browser, all return a family whose only member is ENSG00000127054. In fact, as far as I can tell, each of these family entries is identical, aside from stable id.
Would anyone be able to provide me with insight regarding:
a) The reason for multiple entries for singleton families(I am assuming that the problem is not due to different assemblies since I am searching only ensembl compare release 67).
and/or
b) How I can filter out these
singleton families reliably using the API.
Thanks in advance,
Chris Kelly
Here is my script, trimmed of pieces irrelevant to this question:
#!/usr/bin/perl
use strict;
use warnings;
use Bio::EnsEMBL::Registry;
use Getopt::Long; # for GetOptions used for command line args
use Scalar::Util qw(openhandle); # for openhandle()
my @genome_db_id_list = ();
my $output_file = "families.table"; #output file
#Get command line arguments
GetOptions("id=s" => \@genome_db_id_list, "output=s" => \$output_file,);
unless (@genome_db_id_list){
die "No genome_db_id specified. Exiting...";
}
my $registry='Bio::EnsEMBL::Registry';
print "\n\nLoading registry...";
$registry->load_registry_from_db(
-host => '<a href="http://ensembldb.ensembl.org/" target="_blank">ensembldb.ensembl.org</a>',
-use
r =>
'anonymous',
-port => '5306'); # add -verbose => '1' for more verbose output
print "Done";
#get member adaptor
my $member_adaptor = $registry->get_adaptor('Multi', 'compara', 'Member');
my $family_adaptor = $registry->get_adaptor('Multi', 'compara', 'Family');
my @member_list;
#outside for-loop to iterate body of program for each genome_id specified on the command line
foreach my $species_genome_db_id (@genome_db_id_list){
#Fetch all members of given species (specified by genome_db_id) from given source.
#Source options are: 'ENSEMBLGENE', 'ENSEMBLPEP', 'Uniprot/SPTREMBL',
#'Uniprot/SWISSPROT', 'ENSEMBLTRANS', 'EXTERNALCDS'.
#Each species has a unique genome_db_id in the current ensembl compara db version.
sub get_members_list {
my($source, $genome_db_id, @members) = @_;
#fetch members list
-
returns listref of members
my $new_members_ref = $member_adaptor->fetch_all_by_source_genome_db_id("$source", "$genome_db_id");
#dereference members list ref
my @new_members = @$new_members_ref;
#join new_members list to the list of members
push(@members, @new_members);
@members;
}
#Get members from all sources for the given genome_db_id (denoting a specific species)
@member_list = get_members_list('ENSEMBLGENE', $species_genome_db_id, @member_list);
#open the output file for overwriting
open (OUTPUT, ">$output_file") or die "Could not open: $!";
#initialise @families_list as an empty list
my @families_list=();
#Fetch all families that each member belongs to, as well as
#create .lst files for each chromosome , and print member stable ids
#
and strand orientation to .lst files
foreach my $single_member (@member_list) {
#get member chr strand and name of for use by subsequent commands
my $chr_name = $single_member->chr_name();
my $chr_strand;
if ($single_member->chr_strand() == -1){
$chr_strand = '-';
}
elsif ($single_member->chr_strand() == 1) {
$chr_strand = '+';
}
else{
$chr_strand = '';
}
#get stable id for member
my $mem_stab_id = $single_member->stable_id();
#construct .lst file names of the format<id>_<chr>.txt
my $lst_file_name = "$species_genome_db_id"."_"."$chr_name".".lst";
open(my $fh,
">>$lst_file_name");
print $fh ("$mem_stab_id"."$chr_strand"."\n");
close($fh);
my $new_families_list_ref = $family_adaptor->fetch_all_by_Member($single_member);
my @new_families_list = @$new_families_list_ref;
if (@new_families_list){
#print member stable id next to each corresponding family stable id
foreach my $single_family (@new_families_list){
my $fam_stab_id = $single_family->stable_id();
print OUTPUT "$mem_stab_id\t$fam_stab_id\n";
}
}
else{
print OUTPUT "$mem_stab_id\t$mem_stab_id\n";
}
$count++;
}
}
<hr>
Dev mailing list <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a>
List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info</a>/
</pre>
</div>
_______________________________________________<br>
Dev mailing list <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Dev mailing list <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br>
</blockquote>
</div>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Dev mailing list <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a>
List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Javier Herrero, PhD
Ensembl Coordinator and Ensembl Compara Project Leader
European Bioinformatics Institute (EMBL-EBI)
Wellcome Trust Genome Campus, Hinxton
Cambridge - CB10 1SD - UK</pre>
</font></span></div>
<br>_______________________________________________<br>
Dev mailing list <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br>