Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nested
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matej Lexa
nested
Commits
679706b7
There was an error fetching the commit references. Please try again later.
Commit
679706b7
authored
7 years ago
by
rlapar
Browse files
Options
Downloads
Patches
Plain Diff
call gt sketch externally
parent
a1b0117b
No related branches found
No related tags found
1 merge request
!3
Sketch external
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
gt.style
+18
-324
18 additions, 324 deletions
gt.style
nested.py
+3
-0
3 additions, 0 deletions
nested.py
python/config.py
+10
-4
10 additions, 4 deletions
python/config.py
python/sketch.py
+15
-5
15 additions, 5 deletions
python/sketch.py
with
46 additions
and
333 deletions
gt.style
+
18
−
324
View file @
679706b7
...
...
@@ -52,91 +52,11 @@ style =
max_show_width = nil,
},
--------------------------------------
domain
= {
GAG
= {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0, alpha = 1.0},
fill = {red=0.0, green=1.0, blue=1.0, alpha = 5.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
domain_base = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0, alpha = 0.0},
fill = {red=0.0, green=0.0, blue=0.0, alpha = 0.1},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
LTR_finder_TE = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = false,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
LTR_PPT = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.4, green=0.5, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
LTR_PBS = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.4, green=0.5, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
GAG = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
fill = {red=0.5, green=0.2, blue=0.1, alpha = 5.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
...
...
@@ -149,106 +69,10 @@ style =
},
--------------------------------------
AP = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
INT = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
RT = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
RNaseH = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
XX = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 0.5},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.3, green=0.3, blue=0.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
mRNA = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.4, green=0.5, blue=0.6},
style = "box",
-- Collapsing options
collapse_to_parent = false,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
exon = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.6, green=0.6, blue=0.9},
stroke_marked = {red=1.0, green=0.0, blue=0.0, alpha = 1.0},
fill = {red=0.5, green=1.0, blue=1.0, alpha = 5.0},
style = "box",
-- Collapsing options
collapse_to_parent = true,
...
...
@@ -260,11 +84,11 @@ style =
max_show_width = nil,
},
--------------------------------------
CDS
= {
INT
= {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.
9
, green=
0.9
, blue=0.
2
},
stroke_marked = {red=1.0, green=0.0, blue=0.0
, alpha = 1.0
},
fill = {red=0.
0
, green=
1.0
, blue=0.
5, alpha = 5.0
},
style = "box",
-- Collapsing options
collapse_to_parent = true,
...
...
@@ -276,29 +100,13 @@ style =
max_show_width = nil,
},
--------------------------------------
T
F_binding_site
= {
R
T = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=
0.8
, green=0.
6
, blue=
0.6
},
stroke_marked = {red=1.0, green=0.0, blue=0.0
, alpha = 1.0
},
fill = {red=
1.0
, green=0.
0
, blue=
1.0, alpha = 5.0
},
style = "box",
-- Collapsing options
collapse_to_parent = false,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
intron = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=1.0, green=1.0, blue=1.0},
style = "caret",
-- Collapsing options
collapse_to_parent = true,
split_lines = true,
-- Caption options
...
...
@@ -308,43 +116,11 @@ style =
max_show_width = nil,
},
--------------------------------------
repeat_region = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.8, green=0.3, blue=0.3},
style = "box",
-- Collapsing options
collapse_to_parent = false,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = 0,
},
--------------------------------------
LTR_retrotransposon = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.8, green=0.5, blue=0.5},
style = "box",
-- Collapsing options
collapse_to_parent = false,
split_lines = true,
-- Caption options
max_capt_show_width= nil,
-- Display this track only if the viewport is not wider than this
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
long_terminal_repeat = {
RNaseH = {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha = 1.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=
0.9
, green=
0.9
, blue=0.
4
},
stroke_marked = {red=1.0, green=0.0, blue=0.0
, alpha = 1.0
},
fill = {red=
1.0
, green=
1.0
, blue=0.
0, alpha = 5.0
},
style = "box",
-- Collapsing options
collapse_to_parent = true,
...
...
@@ -355,15 +131,12 @@ style =
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
target_site_duplication = {
max_show_width = 0,
},
--------------------------------------
protein_match
= {
domain_base
= {
-- Color definitions
stroke = {red=0.0, green=0.0, blue=0.0, alpha =
1
.0},
stroke_marked = {red=1.0, green=0.0, blue=0.0},
fill = {red=0.
1
, green=0.
1
, blue=0.
5
},
stroke = {red=0.0, green=0.0, blue=0.0, alpha =
0
.0},
stroke_marked = {red=1.0, green=0.0, blue=
0.0, alpha =
0.0},
fill = {red=0.
0
, green=0.
0
, blue=0.
0, alpha = 0.1
},
style = "box",
-- Collapsing options
collapse_to_parent = true,
...
...
@@ -374,86 +147,7 @@ style =
-- number of nucleotides. Set to 0 to disable type track.
max_show_width = nil,
},
--------------------------------------
five_prime_cis_splice_site = {
collapse_to_parent = true,
},
--------------------------------------
five_prime_splice_site = {
collapse_to_parent = true,
},
--------------------------------------
three_prime_cis_splice_site = {
collapse_to_parent = true,
},
--------------------------------------
three_prime_splice_site = {
collapse_to_parent = true,
},
--------------------------------------
expressed_sequence_match = {
fill = {red=0.2, green=0.2, blue=0.8},
max_show_width = 10000,
max_num_lines = 10,
max_capt_show_width= 5000,
},
--------------------------------------
binding_site = {
fill = {red=0.7, green=0.2, blue=0.8},
max_show_width = 10000,
max_num_lines = 10,
max_capt_show_width= 10000,
},
--------------------------------------
SNP = {
fill = {red=0.1, green=0.8, blue=0.8},
max_show_width = 10000,
max_num_lines = 10,
max_capt_show_width= 10000,
},
--------------------------------------
deletion = {
fill = {red=0.1, green=0.8, blue=0.8},
max_show_width = nil,
max_num_lines = 10,
max_capt_show_width= 10000,
},
--------------------------------------
chromosome = {
fill = {red=0.1, green=0.8, blue=0.8},
max_show_width = nil,
max_num_lines = 10,
},
--------------------------------------
substitution = {
fill = {red=1.0, green=0.1, blue=0.05},
max_show_width = 10000,
max_num_lines = 10,
max_capt_show_width= 1000,
},
--------------------------------------
BED_feature = {
fill = {red=0.0, green=0.1, blue=0.0},
style = "box",
},
--------------------------------------
BED_thick_feature = {
fill = {red=0.0, green=0.5, blue=0.0},
style = "box",
collapse_to_parent = true,
},
--------------------------------------
BED_block = {
fill = {red=0.0, green=1.0, blue=0.0},
style = "box",
collapse_to_parent = true,
},
--------------------------------------
GC_content = {
-- this is for a custom track
stroke = {red=0.2, green=0.2, blue=1.0, alpha = 0.4},
},
--------------------------------------
---------------------------------------
-- Defines various format options for drawing.
format =
{
...
...
This diff is collapsed.
Click to expand it.
nested.py
+
3
−
0
View file @
679706b7
...
...
@@ -18,6 +18,9 @@ def main(input_fasta):
print
(
e
)
sys
.
exit
(
1
)
if
not
os
.
path
.
exists
(
'
data
'
):
os
.
makedirs
(
'
data
'
)
if
not
os
.
path
.
exists
(
'
tmp
'
):
os
.
makedirs
(
'
tmp
'
)
...
...
This diff is collapsed.
Click to expand it.
python/config.py
+
10
−
4
View file @
679706b7
ltr_finder_path
=
"
/home/radovan/lexa/LTR_finder/ltr_finder
"
ltr_finder_prosite_path
=
"
/home/radovan/lexa/prosite
"
ltr_finder_tRNAdb_path
=
"
/home/radovan/lexa/LTR_finder/tRNAdb/Athal-tRNAs.fa
"
ltr_finder_path
=
'
/home/radovan/lexa/LTR_finder/ltr_finder
'
ltr_finder_prosite_path
=
'
/home/radovan/lexa/prosite
'
ltr_finder_tRNAdb_path
=
'
/home/radovan/lexa/LTR_finder/tRNAdb/Athal-tRNAs.fa
'
ltr_finder_args
=
[
'
-l
'
,
'
32
'
]
ltr_finder_args
+=
[
'
-S
'
,
'
3
'
]
...
...
@@ -13,7 +13,13 @@ ltr_finder_args += ['-w', '2'] #don't change, parsing format needed!
ltr_finder_args
+=
[
'
-a
'
,
ltr_finder_prosite_path
]
ltr_finder_args
+=
[
'
-s
'
,
ltr_finder_tRNAdb_path
]
blastx_gydb_protein_db
=
"
/home/radovan/lexa/blastDB/data/gydb_proteins.fa
"
call_gt_sketch_externally
=
True
gt_sketch_path
=
'
gt
'
gt_sketch_args
=
[
'
sketch
'
]
gt_sketch_args
+=
[
'
-width
'
,
'
1400
'
]
gt_sketch_args
+=
[
'
-style
'
,
'
/home/radovan/git/nested/gt.style
'
]
blastx_gydb_protein_db
=
'
/home/radovan/lexa/blastDB/data/gydb_proteins.fa
'
blastx_args
=
{
'
num_threads
'
:
3
,
'
dbsize
'
:
90000
,
...
...
This diff is collapsed.
Click to expand it.
python/sketch.py
+
15
−
5
View file @
679706b7
import
pprint
import
subprocess
import
config
from
BCBio
import
GFF
from
Bio.Seq
import
Seq
from
Bio.SeqRecord
import
SeqRecord
from
Bio.SeqFeature
import
SeqFeature
,
FeatureLocation
from
gt.core
import
*
from
gt.extended
import
*
from
gt.annotationsketch
import
*
from
gt.annotationsketch.custom_track
import
CustomTrack
from
gt.core.gtrange
import
Range
try
:
from
gt.core
import
*
from
gt.extended
import
*
from
gt.annotationsketch
import
*
from
gt.annotationsketch.custom_track
import
CustomTrack
from
gt.core.gtrange
import
Range
except
ImportError
:
print
'
Warning: Could not import gt, sketch needs to be called externally!
'
#a contains b as subinterval
def
contains
(
a
,
b
):
...
...
@@ -105,6 +110,11 @@ def createGFF(gene, nested):
def
visualize
(
gene_id
):
if
config
.
call_gt_sketch_externally
:
process
=
subprocess
.
Popen
([
config
.
gt_sketch_path
]
+
config
.
gt_sketch_args
+
[
'
data/{}.png
'
.
format
(
gene_id
)]
+
[
'
data/{}.gff
'
.
format
(
gene_id
)])
return
#Visualize using python
#Style
style
=
Style
()
style
.
load_file
(
'
gt.style
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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