Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
27cb9af0
Commit
27cb9af0
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
not used as far as I can tell
parent
f45a2f36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/aligner
+0
-105
0 additions, 105 deletions
scripts/aligner
with
0 additions
and
105 deletions
scripts/aligner
deleted
100755 → 0
+
0
−
105
View file @
f45a2f36
#!/usr/local/ensembl/bin/perl -w
# Output a transcript (or raw contig) and its supporting evidence
# (or similarity features) in Fasta format, to stdout.
# Can also output more than one such alignment. With raw contigs,
# output may be limited to all hits with a given logic name.
#
# usage: aligner [--user <username>] [--pass <password>] [--dbname <dbname>] \
# [--host <host>] --transcript <id> [<id>...]
#
# aligner [--user <username>] [--pass <password>] [--dbname <dbname>] \
# [--host <host>] --contig [--logic_name <logicname>] <id> [<id>...]
#
# Stable IDs and/or internal dbIDs may be used for transcripts.
# It isn't possible to mix contigs and transcripts in the
# same command.
#
# For example:
#
# transcript stable ID, default database details, supporting evidence:
# aligner --transcript ENST00000279043 > ENST00000279043.fa
#
# transcript internal ID, default database details:
# aligner --transcript --evidence 12213 > 12213.fa
#
# raw contig, nondefault database details, all hits:
# aligner --contig --host ecs1h --dbname homo_sapiens_core_4_28 \
# --user ensro AL356104.6.1.96693 > AL356104.6.1.96693.fa
#
# raw contig, default database details, human_mrna hits only:
# aligner --logic_name human_mrna --contig AP001464.1.1.115915 > out.fa
use
constant
DEFAULT_USER
=>
'
anonymous
';
use
constant
DEFAULT_DBNAME
=>
'
current
';
use
constant
DEFAULT_HOST
=>
'
kaka.sanger.ac.uk
';
use
strict
;
use
Getopt::
Long
;
use
Bio::EnsEMBL::DBSQL::
DBAdaptor
;
use
Bio::EnsEMBL::
EvidenceAlignment
;
sub
usage_die
{
die
"
usage: aligner [--user <username>] [--pass <password>] [--dbname <dbname>]
\\\n
[--host <host>] --transcript [--evidence] <id> [<id>...]
\n
aligner [--user <username>] [--pass <password>] [--dbname <dbname>]
\\\n
[--host <host>] --contig [--logic_name <logicname>] <id> [<id>...]
\n
";
}
# main program
my
(
$using_transcripts
,
$using_contigs
,
$user
,
$pass
,
$dbname
,
$host
,
$logic_name
,
$evidence
);
GetOptions
("
transcript
"
=>
\
$using_transcripts
,
"
contig
"
=>
\
$using_contigs
,
"
user=s
"
=>
\
$user
,
"
pass=s
"
=>
\
$pass
,
"
dbname=s
"
=>
\
$dbname
,
"
host=s
"
=>
\
$host
,
"
logic_name=s
"
=>
\
$logic_name
,
"
evidence
"
=>
\
$evidence
)
or
usage_die
();
usage_die
()
if
(
(
$using_transcripts
and
$using_contigs
)
||
(
!
$using_transcripts
and
!
$using_contigs
)
||
(
$using_transcripts
and
$logic_name
)
);
$user
=
DEFAULT_USER
if
(
!
$user
);
$dbname
=
DEFAULT_DBNAME
if
(
!
$dbname
);
$host
=
DEFAULT_HOST
if
(
!
$host
);
my
$db
=
new
Bio::EnsEMBL::DBSQL::
DBAdaptor
(
-
user
=>
$user
,
-
pass
=>
$pass
,
-
dbname
=>
$dbname
,
-
host
=>
$host
);
my
$ea
=
Bio::EnsEMBL::
EvidenceAlignment
->
new
(
-
DBADAPTOR
=>
$db
);
if
(
$evidence
)
{
$ea
->
use_supporting_evidence
(
1
);
}
foreach
my
$id
(
@ARGV
)
{
if
(
$using_transcripts
)
{
$ea
->
transcriptid
(
$id
);
}
else
{
$ea
->
contigname
(
$id
);
}
my
@evidence_seq_arr
;
eval
{
if
(
$logic_name
)
{
@evidence_seq_arr
=
$ea
->
fetch_alignment
(
$logic_name
);
}
else
{
@evidence_seq_arr
=
$ea
->
fetch_alignment
;
}
};
if
(
$@
)
{
die
"
error: can't fetch alignment for
$id
: $@
\n
";
}
foreach
my
$evidence_obj
(
@evidence_seq_arr
)
{
print
"
>
",
$evidence_obj
->
accession_number
,
"
\n
"
or
die
"
write error for
$id
";
print
$evidence_obj
->
seq
,
"
\n\n
"
or
die
"
write error for
$id
";
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment