Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
ORG.Annotate
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
ORG.Asm
ORG.Annotate
Commits
a16feefc
Commit
a16feefc
authored
Apr 05, 2019
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a -l option to set a minimum length on the contig to annotate
parent
35e27b66
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
org-annotate.sh
org-annotate.sh
+12
-2
No files found.
org-annotate.sh
View file @
a16feefc
...
...
@@ -25,6 +25,7 @@ irdetection="yes"
organism
=
"no"
types
=
"chloro"
partial
=
0
minlength
=
0
function
usage
{
echo
"Usage:"
;
...
...
@@ -56,6 +57,9 @@ function usage {
echo
echo
' -p | --partial'
echo
' Indicates that the genome sequence is partial and therefore in several contigs'
echo
echo
' -l | --min-length'
echo
' Indicates for partial mode the minimum length of contig to annotate'
exit
$2
}
...
...
@@ -67,7 +71,7 @@ function fastaIterator() {
}
# options may be followed by one colon to indicate they have a required argument
if
!
options
=
$(
getopt
-o
t:o:icrmhp
-l
ncbi-taxid:,organism,no-ir-detection,chloroplast,nuclear-rdna,mitochondrion,partial
,help
--
"
$@
"
)
if
!
options
=
$(
getopt
-o
t:o:icrmhp
l:
-l
ncbi-taxid:,organism,no-ir-detection,chloroplast,nuclear-rdna,mitochondrion,partial,min-length:
,help
--
"
$@
"
)
then
# something went wrong, getopt will put out an error message for us
usage
$0
1
...
...
@@ -85,6 +89,7 @@ do
-r
|
--nuclear-rdna
)
types
=
"nucrdna"
;;
-m
|
--mitochondrion
)
types
=
"mito"
;;
-p
|
--partial
)
partial
=
"1"
;;
-l
|
--min-length
)
minlength
=
"
$2
"
;
shift
;;
-h
|
--help
)
usage
$0
0
;;
(
--
)
shift
;
break
;;
(
-
*
)
echo
"
$0
: error - unrecognized option
$1
"
1>&2
;
exit
1
;;
...
...
@@ -97,6 +102,7 @@ loginfo "Annotating mode.....: $types"
loginfo
"IR detection mode...:
$irdetection
"
loginfo
"Organism............:
$organism
"
loginfo
"Partial mode........:
$partial
"
loginfo
"Minimum length......:
$minlength
"
#############################
...
...
@@ -124,6 +130,9 @@ pushTmpDir ORG.organnot
unset
IFS
if
[[
!
-z
"
${
sequence
}
"
]]
;
then
echo
"
${
sequence
}
"
>
toannotate.fasta
sl
=
$(
seqlength
"toannotate.fasta"
)
if
((
sl
>=
minlength
))
;
then
seqid
=
$(
$AwkCmd
'(NR==1) {print substr($1,2,1000)}'
toannotate.fasta
)
...
...
@@ -326,7 +335,8 @@ pushTmpDir ORG.organnot
loginfo
"Closing sequence part..."
echo
"//"
loginfo
"Done."
fi
fi
# End of the minimum length condition
fi
# End of not empty sequence condition
IFS
=
$'
\f
'
done
# End of the loop over the sequences
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment