Commit ede045fa authored by Marek Szuba's avatar Marek Szuba
Browse files

Convert stray tabs to spaces

parent 95953fbe
......@@ -136,8 +136,8 @@ sub fetch_all_by_external_name {
my $entry_adaptor = $self->db->get_DBEntryAdaptor();
my @ids = $entry_adaptor->list_rnaproduct_ids_by_extids($external_name,
$external_db_name,
$override);
$external_db_name,
$override);
my $transcript_adaptor = $self->db()->get_TranscriptAdaptor();
......@@ -468,12 +468,12 @@ sub _fetch_direct_query {
my $sql =
sprintf("SELECT rp.rnaproduct_id, pt.code, rp.transcript_id, "
. "rp.seq_start, rp.start_exon_id, rp.seq_end, rp.end_exon_id, "
. "rp.seq_start, rp.start_exon_id, rp.seq_end, rp.end_exon_id, "
. "rp.stable_id, rp.version, %s, %s "
. "FROM rnaproduct rp JOIN rnaproduct_type pt "
. "FROM rnaproduct rp JOIN rnaproduct_type pt "
. "ON rp.rnaproduct_type_id = pt.rnaproduct_type_id "
. "WHERE %s = ?",
$rp_created_date, $rp_modified_date, $where_args->[0]);
. "WHERE %s = ?",
$rp_created_date, $rp_modified_date, $where_args->[0]);
my $sth = $self->prepare($sql);
$sth->bind_param(1, $where_args->[1], $where_args->[2]);
$sth->execute();
......@@ -501,7 +501,7 @@ sub _obj_from_sth {
my $transcript_adaptor = $self->db()->get_TranscriptAdaptor();
while (my $row_ref = shift @{$sql_data}) {
my ($rnaproduct_id, $type_code, $transcript_id, $seq_start, $start_exon_id,
$seq_end, $end_exon_id, $stable_id, $version, $created_date,
$seq_end, $end_exon_id, $stable_id, $version, $created_date,
$modified_date) = @{$row_ref};
if (!defined($rnaproduct_id)) {
......
......@@ -134,8 +134,8 @@ sub arm {
my $n_arms = scalar @{$arm_attrs};
if ($n_arms > 0) {
if ($n_arms > 1) {
throw("MicroRNA " . $self->display_id() .
" has multiple arm attributes");
throw("MicroRNA " . $self->display_id() .
" has multiple arm attributes");
}
$self->{'arm'} = $arm_attrs->[0]->value();
}
......
......@@ -110,7 +110,7 @@ sub new { ## no critic (Subroutines::RequireArgUnpacking)
my ($seq_start, $seq_end, $start_exon, $end_exon, $stable_id, $version, $dbID,
$adaptor, $seq, $created_date, $modified_date ) =
rearrange(["SEQ_START", "SEQ_END", "START_EXON", "END_EXON",
rearrange(["SEQ_START", "SEQ_END", "START_EXON", "END_EXON",
"STABLE_ID", "VERSION", "DBID", "ADAPTOR", "SEQ",
"CREATED_DATE", "MODIFIED_DATE"], @_);
......@@ -356,10 +356,10 @@ sub genomic_end {
if ($transcript->strand() >= 0) {
$self->{'genomic_end'} =
$transcript->start() + ($self->end() - 1);
$transcript->start() + ($self->end() - 1);
} else {
$self->{'genomic_end'} =
$transcript->end() - ($self->start() - 1);
$transcript->end() - ($self->start() - 1);
}
}
......@@ -388,10 +388,10 @@ sub genomic_start {
if ($transcript->strand() >= 0) {
$self->{'genomic_start'} =
$transcript->start() + ($self->start() - 1);
$transcript->start() + ($self->start() - 1);
} else {
$self->{'genomic_start'} =
$transcript->end() - ($self->end() - 1);
$transcript->end() - ($self->end() - 1);
}
}
......@@ -733,10 +733,10 @@ sub stable_id_version {
my $vindex = rindex($stable_id, '.');
($self->{stable_id},
$self->{version}) = ($vindex > 0 ?
(substr($stable_id, 0, $vindex),
substr($stable_id, $vindex + 1)) :
$stable_id, undef
);
(substr($stable_id, 0, $vindex),
substr($stable_id, $vindex + 1)) :
$stable_id, undef
);
}
return $self->{stable_id} . ($self->{version} ? ".$self->{version}" : '');
......
......@@ -57,12 +57,12 @@ subtest 'RNAProductTypeMapper tests' => sub {
is($rpt_mapper->type_code_to_class('miRNA'), 'Bio::EnsEMBL::MicroRNA',
'Can map existing type ID to class');
dies_ok(sub { $rpt_mapper->type_code_to_class('semprini'); },
'Exception thrown on unknown type ID');
'Exception thrown on unknown type ID');
is($rpt_mapper->class_to_type_code('Bio::EnsEMBL::RNAProduct'), 'generic',
'Can map existing class to type ID');
dies_ok(sub { $rpt_mapper->class_to_type_code('Bio::EnsEMBL::Storable'); },
'Exception thrown on unknown rnaproduct class name');
'Exception thrown on unknown rnaproduct class name');
};
......@@ -327,7 +327,7 @@ subtest 'Attribute functionality' => sub {
is(scalar @{ $rp_nonsense }, 0, 'Get empty attribute list for nonsense code');
dies_ok(sub { $rp->add_Attributes({}) },
'add_Attributes() dies on invalid argument type');
'add_Attributes() dies on invalid argument type');
my $n_attrs_before = scalar @{ $rp_all_attrs };
my $extra_attr1 = Bio::EnsEMBL::Attribute->new(
......@@ -354,7 +354,7 @@ subtest 'xref functionality' => sub {
cmp_ok(scalar @{ $xrefs }, '>', 0, 'Got a non-empty list of DBEntries');
dies_ok(sub { $rp->add_DBEntry({}) },
'add_DBEntry() dies on invalid argument type');
'add_DBEntry() dies on invalid argument type');
my $n_xrefs_before = scalar @{ $xrefs };
my $dbe = Bio::EnsEMBL::DBEntry->new(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment