from transcript as t, exon_transcript as et, exon_stable_id as esi
where t.transcript_id = et.transcript_id and et.exon_id = esi.exon_id"
);
$get_genes_sth->execute;
my$gene_rows=[];# cache for batches of rows
while(
my$row=(
shift(@$gene_rows)||# get row from cache, or reload cache:
shift(
@{
$gene_rows=
$get_genes_sth->fetchall_arrayref(undef,10_000)
||[]
}
)
)
)
{
$exons{$row->[0]}{$row->[1]}=1;
}
#warn "Exons: " . scalar (keys %exons);
print"Done Get Genes query...\n---------------------\n";
# SNP query
my$snp_sth=eval{
$dbh->prepare(
"select distinct(vf.variation_name) from $SNPDB.transcript_variation as tv, $SNPDB.variation_feature as vf where vf.variation_feature_id = tv.variation_feature_id and tv.transcript_stable_id in(?)"
"select distinct(vf.variation_name) from $SNPDB.transcript_variation as tv, $SNPDB.variation_feature as vf where vf.variation_feature_id = tv.variation_feature_id and tv.feature_stable_id in(?)"
);
};
...
...
@@ -411,8 +448,14 @@ g.seq_region_id=ae.seq_region_id and ae.exc_type='HAP'", [qw(gene_id)]