[ensembl-dev] accessing the tilepath entries programatically
Thibaut Hourlier
thibaut at ebi.ac.uk
Tue Jun 30 13:15:37 BST 2015
Hi Duarte,
The clone names are stored in the misc_* tables. So you need to use the MiscFeatureAdaptor, http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1DBSQL_1_1MiscFeatureAdaptor.html:
my $misc_clones = $mfa->fetch_all_by_Slice_and_set_code('tilepath');
foreach my $clone (@$misc_clones) {
print join("\t", $clone->slice->seq_region_name, $clone->start, $clone->end, @{$clone->get_all_attribute_values('name')}), "\n";
}
A warning though, this is the tilepath so the boundaries of the clones are different from the contigs/clones in the assembly as sometimes they didn't use the entire clone for the assembly
Hope this help
Thibaut
> On 30 Jun 2015, at 11:50, Duarte Molha <duartemolha at gmail.com> wrote:
>
> I used this code to get all the gebnomic coordinates of your subcontigs:
>
>
> my @slices = @{ $slice_adaptor->fetch_all('clone') };
> foreach my $slice (@slices){
> $progress->update();
> my $clone_name = $slice->seq_region_name();
> my $projection = $slice->project('toplevel');
> foreach my $segment ( @{$projection} ) {
> my $to_slice = $segment->to_Slice();
> print join "\t", ("chr".$to_slice->seq_region_name(), $to_slice->start(), $to_slice->end(), $clone_name."\n");
> }
> }
>
> However, by doing this, the database does not fetch the original clone name
>
> for example.. using this script I get
> chr4 47567235 47733411 AC092597.1
>
> However I would like to get :
>
> chr4 47567235 47733411 RP11-100N21
>
> Can someone explain what I am doing wrong?
>
> Thanks
>
> Duarte
>
>
>
> =========================
> Duarte Miguel Paulo Molha
> http://about.me/duarte
> =========================
>
> On 30 June 2015 at 09:45, Duarte Molha <duartemolha at gmail.com> wrote:
> Dear devs
>
> How can I search for a specific clone id present on your tilepath
>
> for example this: RP5-892C22
>
> I would like to use the perl API if possible
>
> Many thanks
>
> Duarte
>
>
>
> =========================
> Duarte Miguel Paulo Molha
> http://about.me/duarte
> =========================
>
> _______________________________________________
> Dev mailing list Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
More information about the Dev
mailing list