Skip to content

Commit

Permalink
fix for #464
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory Maughmer committed Sep 24, 2020
1 parent 2d6ac68 commit 8a37010
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions tools/gff3/shinefind.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def highlight_sd(cls, sequence, start, end):
)

@classmethod
def to_features(cls, hits, strand, parent_start, parent_end, feature_id=None, sd_min=5, sd_max=15):
def to_features(cls, hits, strand, parent_start, parent_end, feature_id=None, sd_min=3, sd_max=17):
results = []
for idx, hit in enumerate(hits):
# gene complement(124..486)
Expand Down Expand Up @@ -113,7 +113,7 @@ def to_features(cls, hits, strand, parent_start, parent_end, feature_id=None, sd
results.append(tmp)
return results

def testFeatureUpstream(self, feature, record, sd_min=5, sd_max=15):
def testFeatureUpstream(self, feature, record, sd_min=3, sd_max=17):
# Strand information necessary to getting correct upstream sequence
strand = feature.location.strand

Expand All @@ -135,7 +135,7 @@ def testFeatureUpstream(self, feature, record, sd_min=5, sd_max=15):
seq = str(tmp.extract(record.seq))
return self.list_sds(seq), start, end, seq

def hasSd(self, feature, record, sd_min=5, sd_max=15):
def hasSd(self, feature, record, sd_min=3, sd_max=17):
sds, start, end, seq = self.testFeatureUpstream(
feature, record, sd_min=sd_min, sd_max=sd_max
)
Expand Down Expand Up @@ -178,8 +178,8 @@ def shinefind(
gff3,
gff3_output=None,
table_output=None,
lookahead_min=5,
lookahead_max=15,
lookahead_min=3,
lookahead_max=17,
top_only=False,
add=False,
):
Expand Down Expand Up @@ -396,14 +396,14 @@ def shinefind(
nargs="?",
type=int,
help="Number of bases upstream of CDSs to end search",
default=5,
default=3,
)
parser.add_argument(
"--lookahead_max",
nargs="?",
type=int,
help="Number of bases upstream of CDSs to begin search",
default=15,
default=17,
)

parser.add_argument("--top_only", action="store_true", help="Only report best hits")
Expand Down
10 changes: 7 additions & 3 deletions tools/gff3/shinefind.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="edu.tamu.cpt.genbank.shinefind" name="Shine Find" version="19.1.0.0">
<tool id="edu.tamu.cpt.genbank.shinefind" name="Shine Find" version="20.9.0.0">
<description>Identify shine-dalgarno sequences</description>
<macros>
<import>macros.xml</import>
Expand Down Expand Up @@ -29,8 +29,8 @@ $top_only
<expand macro="genome_selector" />
<expand macro="gff3_input" />

<param label="Number of bases upstream of CDSs to end search (--lookahead_min)" name="lookahead_min" type="integer" value="5"/>
<param label="Number of bases upstream of CDSs to begin search (--lookahead_max)" name="lookahead_max" type="integer" value="15"/>
<param label="Minimum number of bases upstream of CDS for gap (--lookahead_min)" name="lookahead_min" type="integer" value="3"/>
<param label="Maximum number of bases upstream of CDS for gap (--lookahead_max)" name="lookahead_max" type="integer" value="17"/>
<param checked="true" label="Automatically add RBSs to input GFF3" name="add"
type="boolean" truevalue="--add" falsevalue="" />
<param checked="true" label="Only report best hits (--top_only)"
Expand Down Expand Up @@ -79,6 +79,10 @@ possible Shine-Dalgarno sequences:
- AGG
- GGT
**Gap Min/Max Settings**
In previous versions of this tool, the min/max was set for the window to find a Shine-Dalgarno sequence, but
currently we specify the minimum and maxium GAP between the end of the SD and the start of the closest CDS.
By default, only the first (closest to consensus) hit to the list is returned to the GFF3.
By selecting ‘No’ for ‘Only report best hits’, **all hits** to the possible SD list will
be added to the GFF3 file.
Expand Down

0 comments on commit 8a37010

Please sign in to comment.