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
f86df9eb
Commit
f86df9eb
authored
12 years ago
by
Amonida Zadissa
Browse files
Options
Downloads
Patches
Plain Diff
Don't assume the coordinate system but get it from the commandline.
Added 'coord_system' as an option. Minor formatting.
parent
64c8fe52
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
misc-scripts/assembly_patches/assembly_patch_load.pl
+16
-9
16 additions, 9 deletions
misc-scripts/assembly_patches/assembly_patch_load.pl
with
16 additions
and
9 deletions
misc-scripts/assembly_patches/assembly_patch_load.pl
+
16
−
9
View file @
f86df9eb
...
...
@@ -9,17 +9,17 @@ use strict;
my
$assembly_acc
;
my
$assembly_name
;
my
$pass
;
my
$mapping_file
=
"
./data/alt.scaf.agp
";
my
$txt_file
=
"
./data/alt_scaffold_placement.txt
";
my
$mapping_file
=
"
./data/alt.scaf.agp
";
my
$txt_file
=
"
./data/alt_scaffold_placement.txt
";
my
$patchtype_file
=
"
./data/patch_type
";
my
$dbname
;
my
$host
;
my
$user
;
my
$port
=
3306
;
my
$port
=
3306
;
my
$scaf_syn_ext_id
=
700
;
my
$central_coord_system
=
'
supercontig
'
;
my
$central_coord_system
;
&
GetOptions
(
GetOptions
(
'
pass=s
'
=>
\
$pass
,
'
mapping_file=s
'
=>
\
$mapping_file
,
'
txt_file=s
'
=>
\
$txt_file
,
...
...
@@ -31,6 +31,7 @@ my $central_coord_system = 'supercontig';
'
scaf_syn_ext_id=n
'
=>
\
$scaf_syn_ext_id
,
'
assembly_name=s
'
=>
\
$assembly_name
,
'
assembly_acc=s
'
=>
\
$assembly_acc
,
'
coord_system=s
'
=>
\
$central_coord_system
);
#needed to update the meta table
...
...
@@ -376,12 +377,18 @@ MAP: while(<MAPPER>){
$get_seq_id_sth
->
execute
(
$contig
);
$get_seq_id_sth
->
bind_columns
(
\
$cmp_seq_id
);
$get_seq_id_sth
->
fetch
;
if
(
!
defined
(
$cmp_seq_id
)){
print
"
Could not get seq_region_id for
$contig
trying pfetch
\n
";
my
$out
=
system
("
pfetch
$contig
> ./
$contig
.fa
");
# awful hack for GRC patch 8 assembly problem:
if
(
$contig
eq
"
FP700111.21
")
{
$out
=
system
("
wget 'http://www.ebi.ac.uk/cgi-bin/sva/sva.pl?query=FP700111.21&snapshot=&save_id=Save&format=FASTA&entry_id=1415709343' -O - -o wget.log | tr '[:lower:]' '[:upper:]' > ./
$contig
.fa
");
my
$out
=
`
pfetch
$contig
`;
if
(
$out
=~
/no match/
)
{
print
"
Could not get seq_region_id for
$contig
trying eutils
\n
";
$out
=
system
("
wget -o
$contig
.wget.log -O
$contig
.fa 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=
$contig
&rettype=fasta&retmode=text' > ./
$contig
.fa
");
}
else
{
open
(
CONTIGFILE
,
"
>
$contig
.fa
");
print
CONTIGFILE
$out
;
close
(
CONTIGFILE
);
}
my
$contig_seq
=
"";
open
(
FA
,"
<./
$contig
.fa
")
||
die
"
Could not open file ./
$contig
.fa
\n
";
...
...
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