Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ngspipelines
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
genotoul-bioinfo
ngspipelines
Commits
93a7ae2f
Commit
93a7ae2f
authored
8 years ago
by
Celine Noirot
Browse files
Options
Downloads
Patches
Plain Diff
Try to handle species in refseq database.
parent
c44ea033
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflows/rnaseqdenovo/bin/blast2annot.py
+22
-8
22 additions, 8 deletions
workflows/rnaseqdenovo/bin/blast2annot.py
with
22 additions
and
8 deletions
workflows/rnaseqdenovo/bin/blast2annot.py
+
22
−
8
View file @
93a7ae2f
...
...
@@ -62,7 +62,7 @@ def spFromHit( alignment ):
@param alignment : [Bio::blast::Record::Alignment] the alignment.
"""
species
=
None
if
re
.
match
(
"
.*OS=.*
"
,
alignment
.
hit_def
)
is
not
None
:
if
re
.
match
(
"
.*OS=.*
"
,
alignment
.
hit_def
)
is
not
None
:
# refseq_prot, swissprot
try
:
matches
=
re
.
search
(
"
OS=([^=]+)
"
,
alignment
.
hit_def
)
if
matches
is
not
None
:
...
...
@@ -73,16 +73,30 @@ def spFromHit( alignment ):
species
=
clean_matches
.
group
(
1
)
except
:
pass
else
:
try
:
matches
=
re
.
search
(
'
\[([^\]]+)\]
'
,
alignment
.
hit_def
)
species
=
matches
.
group
(
1
)
except
:
species
=
None
pass
else
:
#refseq_genomic >gi|76496352|ref|NT_165333.1|NT_165333 Mus musculus genomic sequence, ENCODE region ENm001
#refseq_rna >gi|31341369|ref|NM_176670.2| Bos taurus ATP synthase, H+ transporting, mitochondrial F1 complex, delta subunit (ATP5D), mRNA
#refseq_prot >gi|66818355|ref|XP_642837.1| hypothetical protein DDB_G0276911 [Dictyostelium discoideum AX4]
if
re
.
match
(
"
gi\|\d+\|ref\|\S+\|
"
,
alignment
.
hit_id
)
is
not
None
:
#if refseq
try
:
matches
=
re
.
search
(
'
\[([^\]]+)\]
'
,
alignment
.
hit_def
)
#si refseq_prot espece entre []
species
=
matches
.
group
(
1
)
except
:
# refseq_genomic ou refseq_rna
matches
=
re
.
search
(
"
gi\|\d+\|ref\|\S+\|\s(\S+\s\S+)
"
,
alignment
.
hit_def
)
if
matches
is
not
None
:
species
=
matches
.
group
(
1
)
else
:
try
:
matches
=
re
.
search
(
'
\[([^\]]+)\]
'
,
alignment
.
hit_def
)
species
=
matches
.
group
(
1
)
except
:
species
=
None
pass
# Others databases are not implemented
return
species
def
geneNameFromHit
(
alignment
,
gene_name_from_accession
):
"""
@summary : Returns the subject
'
s name.
...
...
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