Skip to content

Commit

Permalink
typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkb3 committed Feb 17, 2021
1 parent 6818f04 commit 03131e6
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 55 deletions.
2 changes: 1 addition & 1 deletion razor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Threshold for Max MCC
# For detecting signal peptides
SP_THRESHOLD = 0.62
SP_THRESHOLD = 0.56
# For signal peptides from fungi
FUNGI_THRESHOLD = 0.23
# For signal peptides with toxic protein
Expand Down
50 changes: 34 additions & 16 deletions src/components/Documentation/RazorDocumentation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import RazorLine from "../Chart/RazorLine";
import SignalData from "./SignalPeptide_Data.csv.gz";
import ToxinData from "./Toxin_Data.csv.gz";
import FungiData from "./Fungi_Data.csv.gz";
import SignalBenchmark from "./benchmark_sp_new.csv.gz";
import ToxinBenchmark from "./benchmark_toxins.csv.gz";
import FungiBenchmark from "./benchmark_fungi.csv.gz";

const data = demoRazor();
const prot = defaultProteinRazor();
Expand Down Expand Up @@ -238,11 +241,11 @@ const RazorDocumentation = (props) => {
color="textPrimary"
>
The number of models with prediction probability
greater than a threshold of 0.62. In this example, a
greater than a threshold of 0.56. In this example, a
total of 5 stars indicates that all 5 models predict
the input sequence harbours a signal peptide. This
threshold shows the highest Matthew's correlation
coefficient on the benchmarking set.
coefficient on the training set.
</Typography>
}
/>
Expand All @@ -269,8 +272,8 @@ const RazorDocumentation = (props) => {
Similar to above, there are 5 distinct models for
prediction of each of these classes of signal
peptides. The threshold for fungi and toxin are 0.23
and 0.33 respectively. In this example, only 1 model
predicts that the signal peptide may be harboured by a
and 0.33 respectively. In this example, 4 models
predict that the signal peptide may be harboured by a
toxin, whereas 3 models predict that the signal
peptide is harboured by a fungal protein. If none of
these models make a positive prediction, these fields
Expand Down Expand Up @@ -384,25 +387,38 @@ const RazorDocumentation = (props) => {
<a href={SignalData} download>
here
</a>
. We also curated a new benchmark set for SP prediction. This
can be downloaded{" "}
<a href={SignalBenchmark} download>
here
</a>
.
</Typography>

<Typography variant="body2" gutterBottom>
The dataset used for the toxin signal peptide prediction can
be downloaded{" "}
<a href={FungiData} download>
The dataset used for the toxin signal peptide training and
benchmarking can be downloaded{" "}
<a href={ToxinData} download>
here
</a>
.
</a>{" "}
and{" "}
<a href={ToxinBenchmark} download>
here
</a>{" "}
respectively.
</Typography>

<Typography variant="body2" gutterBottom>
The dataset used for the fungal signal peptide prediction can
be downloaded{" "}
<a href={ToxinData} download>
The dataset used for the fungal signal peptide training and
benchmarking can be downloaded{" "}
<a href={FungiData} download>
here
</a>
.
</a>{" "}
and{" "}
<a href={FungiBenchmark} download>
here
</a>{" "}
respectively.
</Typography>

<Typography variant="h2" component="h3" gutterBottom>
Expand Down Expand Up @@ -469,7 +485,8 @@ const RazorDocumentation = (props) => {
Bhandari, B.K., Gardner, P.P., Lim, C.S. (2020) Annotating
eukaryotic and toxin-specific signal peptides using Razor.
<cite title="Annotating eukaryotic and toxin-specific signal peptides using Razor.">
{" "}bioRxiv.
{" "}
bioRxiv.
</cite>{" "}
DOI:
<a
Expand All @@ -488,7 +505,8 @@ const RazorDocumentation = (props) => {
Solubility-Weighted Index: fast and accurate prediction of
protein solubility.
<cite title="Solubility-Weighted Index: fast and accurate prediction of protein solubility. ">
{" "}Bioinformatics.
{" "}
Bioinformatics.
</cite>{" "}
DOI:
<a
Expand Down
12 changes: 7 additions & 5 deletions src/components/Documentation/TisignerDocumentation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ const TisignerDocumentation = (props) => {
</a>
. If there are any hits, we report the number of those
hits and their corresponding E values. If there are no
hits, then these two fields are not displayed.
hits, then this field is not displayed.
</Typography>
}
/>
Expand Down Expand Up @@ -546,7 +546,9 @@ const TisignerDocumentation = (props) => {
</Typography>
<Typography variant="body2" gutterBottom>
If unsure input the 71 nt vector-encoded sequence preceding
the start codon.
the start codon. For 5&prime; UTRs shorter than 71
nucleotides, upstream sequences can be used to extend the
UTRs.
</Typography>

<Typography variant="subtitle2" gutterBottom>
Expand Down Expand Up @@ -630,9 +632,9 @@ const TisignerDocumentation = (props) => {
If you find protein solubility prediction and optimisation
useful, please cite :
<br />
Bhandari, B.K., Gardner, P.P., Lim, C.S.
(2020) Solubility-Weighted Index: Fast and Accurate Prediction
of Protein Solubility.
Bhandari, B.K., Gardner, P.P., Lim, C.S. (2020)
Solubility-Weighted Index: Fast and Accurate Prediction of
Protein Solubility.
<cite title="Solubility-Weighted Index: Fast and Accurate Prediction of Protein Solubility ">
{" "}
Bioinformatics.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion src/components/EndPoints.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

export const TIsignerLink = "http://localhost:5050/optimise";
export const RazorLink = "http://localhost:5050/razor";
2 changes: 1 addition & 1 deletion src/components/Tisigner/form/Extra.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Extra extends Component {

{this.state.substitutionMode === "transInit" ? (
<div className="control">
<label className="label">Maximum number of replacable codons</label>
<label className="label">Maximum number of replaceable codons</label>
<Slider
value={this.state.numberOfCodons}
valueLabelDisplay="auto"
Expand Down
68 changes: 37 additions & 31 deletions src/components/Tisigner/form/General.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ const hosts = [
{ value: "Escherichia coli", label: "Escherichia coli" },
{ value: "Saccharomyces cerevisiae", label: "Saccharomyces cerevisiae" },
{ value: "Mus musculus", label: "Mus musculus" },
{ value: "Other", label: "Other" }
{ value: "Other", label: "Other" },
];

const promoters = [
{ value: "T7", label: "T7lac promoter (e.g., pET21)" },
{ value: "Custom", label: "Custom" }
{ value: "Custom", label: "Custom" },
];

const marks = [
{
value: 5,
label: "5"
label: "5",
},
{
value: 30,
label: "30 (Low)"
label: "30 (Low)",
},
{
value: 70,
label: "70 (High)"
label: "70 (High)",
},
{
value: 100,
label: "100"
}
label: "100",
},
];

class General extends Component {
Expand All @@ -51,7 +51,7 @@ class General extends Component {
isValidated:
JSON.parse(localStorage.getItem("isValidatedGeneral")) !== null
? JSON.parse(localStorage.getItem("isValidatedGeneral"))
: true
: true,
};
// this.selectUtr = this.selectUtr.bind(this);
this._selectHost = this._selectHost.bind(this);
Expand All @@ -61,7 +61,7 @@ class General extends Component {
this.customPromoterInput = this.customPromoterInput.bind(this);
}

_selectHost = option => {
_selectHost = (option) => {
// console.log(`You selected ${option.label}, with value ${option.value}`)
this.setState({
host: option.value,
Expand All @@ -70,50 +70,54 @@ class General extends Component {
option.value === "Escherichia coli" ? this.state.promoter : "Custom",
isValidated: false,
customPromoterError:
option.value !== "Escherichia coli" ? "Empty custom promoter." : ""
option.value !== "Escherichia coli" ? "Empty custom promoter." : "",
});
ReactGA.event({
category: "TIsigner Customisation",
action: "Host selected: " + option.value,
label: "General"
label: "General",
});
};

_selectPromoter = option => {
_selectPromoter = (option) => {
// console.log(`You selected ${option.label}, with value ${option.value}`)
this.setState({
promoter: option.value,
customPromoter: "",
isValidated: false,
customPromoterError: option.value === "T7" ? "" : "Empty custom promoter."
customPromoterError:
option.value === "T7" ? "" : "Empty custom promoter.",
});
ReactGA.event({
category: "TIsigner Customisation",
action: "Promoter selected: " + option.value,
label: "General"
label: "General",
});
};

sliderChange = (event, value) => {
this.setState({
targetExpression: value
targetExpression: value,
});
};

radioChange(event) {
this.setState({
optimisationDirection: event.target.value
optimisationDirection: event.target.value,
});

ReactGA.event({
category: "TIsigner Customisation",
action: "Optimisation Direction: " + event.target.value,
label: "General"
label: "General",
});
}

customPromoterInput(event) {
let input = event.target.value.replace(/ /g, "").replace(/U/gi, "T").toUpperCase();
let input = event.target.value
.replace(/ /g, "")
.replace(/U/gi, "T")
.toUpperCase();
let promoter = "";
let filter = /^[ACGTU]+$/;
let isValid = true;
Expand All @@ -135,13 +139,13 @@ class General extends Component {
this.setState({
customPromoter: promoter,
isValidated: this.state.promoter === "T7" ? true : isValid,
customPromoterError: errors
customPromoterError: errors,
});

ReactGA.event({
category: "TIsigner Customisation",
action: "Custom promoter was entered.",
label: "General"
label: "General",
});
}

Expand All @@ -152,14 +156,14 @@ class General extends Component {
!host
? localStorage.setItem("host", JSON.stringify(this.state.host))
: this.setState({
host: host
host: host,
});

const promoter = JSON.parse(localStorage.getItem("promoter"));
!promoter
? localStorage.setItem("promoter", JSON.stringify(this.state.promoter))
: this.setState({
promoter: promoter
promoter: promoter,
});

const substitutionMode = JSON.parse(
Expand All @@ -171,7 +175,7 @@ class General extends Component {
JSON.stringify(this.state.substitutionMode)
)
: this.setState({
substitutionMode: substitutionMode
substitutionMode: substitutionMode,
});

const customPromoter = JSON.parse(localStorage.getItem("customPromoter"));
Expand All @@ -181,7 +185,7 @@ class General extends Component {
JSON.stringify(this.state.customPromoter)
)
: this.setState({
customPromoter: customPromoter
customPromoter: customPromoter,
});

const targetExpression = JSON.parse(
Expand All @@ -193,7 +197,7 @@ class General extends Component {
JSON.stringify(this.state.targetExpression)
)
: this.setState({
targetExpression: targetExpression
targetExpression: targetExpression,
});

const optimisationDirection = JSON.parse(
Expand All @@ -205,7 +209,7 @@ class General extends Component {
JSON.stringify(this.state.optimisationDirection)
)
: this.setState({
optimisationDirection: optimisationDirection
optimisationDirection: optimisationDirection,
});

const isValidated = JSON.parse(localStorage.getItem("isValidatedGeneral"));
Expand All @@ -215,7 +219,7 @@ class General extends Component {
JSON.stringify(this.state.isValidated)
)
: this.setState({
isValidated: this.state.promoter === "T7" ? true : isValidated
isValidated: this.state.promoter === "T7" ? true : isValidated,
});

const customPromoterError = JSON.parse(
Expand All @@ -227,13 +231,13 @@ class General extends Component {
JSON.stringify(this.state.customPromoterError)
)
: this.setState({
customPromoterError: !(promoter === "T7") ? customPromoterError : ""
customPromoterError: !(promoter === "T7") ? customPromoterError : "",
});

ReactGA.event({
category: "TIsigner Customisation",
action: "General Tab was clicked.",
label: "General"
label: "General",
});
}

Expand Down Expand Up @@ -312,7 +316,9 @@ class General extends Component {
/>
</div>
<p className="help ">
Length should be greater than 70 nucleotides.{" "}
Length should be greater than 70 nucleotides. For 5&prime;
UTRs shorter than 71 nucleotides, upstream sequences can be
used to extend the UTRs.
</p>
</div>
)}
Expand Down Expand Up @@ -367,7 +373,7 @@ class General extends Component {
ReactGA.event({
category: "TIsigner Customisation",
action: "Target Expression: " + this.state.targetExpression,
label: "General"
label: "General",
});
}}
/>
Expand Down

0 comments on commit 03131e6

Please sign in to comment.