Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Pipeline update #32

Merged
merged 14 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"copy-to-clipboard": "^3.3.1",
"graphql": "^15.6.1",
"graphql": "^15.7.2",
"jQuery-QueryBuilder": "^2.6.2",
"lodash": "^4.17.21",
"material-table": "1.69.1",
Expand Down
8 changes: 4 additions & 4 deletions src/about.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export default class Info extends React.Component {
fontWeight: "bold",
}}
>
Mean absolute distance from TSS
Median TSS distance
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
The average absolute distance to the Transcription
The median absolute distance to the Transcription
Start Sites (TSS)
</td>
</tr>
Expand Down Expand Up @@ -310,10 +310,10 @@ export default class Info extends React.Component {
fontWeight: "bold",
}}
>
Mean absolute distance from TSS
Median TSS distance
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
The average absolute distance to the Transcription
The average median absolute distance to the Transcription
Start Sites (TSS) of the BED set.
</td>
</tr>
Expand Down
95 changes: 91 additions & 4 deletions src/bedCountsSpan.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@ export default class BedCountsSpan extends React.Component {

async componentDidMount() {
let bfcount = await api
.get("/api/bed/all/data/count")
.get("/api/bed/count")
.catch(function (error) {
alert(error + "; is bedhost running at " + bedhost_api_url + "?");
});
// console.log("BED file count retrieved from the server: ", bfcount.data);
this.setState({ bed: bfcount.data });

let bscount = await api
.get("/api/bedset/all/data/count")
.get("/api/bedset/count")
.catch(function (error) {
alert(error + "; is bedhost running at " + bedhost_api_url + "?");
});
// console.log("BED set count retrieved from the server: ", bscount.data);
this.setState({ bedSet: bscount.data });

let bed = await api.get("/api/bed/all/data?ids=md5sum&limit=1").then(({ data }) => data);
let bed = await api.get("/api/bed/all/metadata?ids=md5sum&limit=1").then(({ data }) => data);
let bedurl = '/bedsplash/' + bed.data[0][0]
this.setState({ sampleBed: bedurl });

let bedset = await api.get("/api/bedset/all/data?ids=md5sum&limt=1").then(({ data }) => data)
let bedset = await api.get("/api/bedset/all/metadata?ids=md5sum&limt=1").then(({ data }) => data)
let bedseturl = '/bedsetsplash/' + bedset.data[0][0]
this.setState({ sampleBedSet: bedseturl });
this.getAPIcount()
Expand Down Expand Up @@ -85,6 +85,92 @@ export default class BedCountsSpan extends React.Component {
bedstat and bedbuncher pipeline.{" "}
</span>
<div>
<Label
style={{
marginTop: "15px",
marginBottom: "5px",
marginLeft: "15px",
fontSize: "15px",
padding: "6px 20px 6px 30px",
}}
as="a"
color="teal"
ribbon
>
Available Servers
</Label>
{
<table style={{ marginLeft: "15px" }}>
<tbody>
<tr>
<th style={{ padding: "3px 15px", fontSize: "10pt" }}>
Server Name
</th>
<th style={{ padding: "3px 15px", fontSize: "10pt" }}>
URL
</th>
<th style={{ padding: "3px 15px", fontSize: "10pt" }}>
Maintainer
</th>
<th style={{ padding: "3px 15px", fontSize: "10pt" }}>
Description
</th>
</tr>
<tr style={{ verticalAlign: "top" }}>
<td
style={{
padding: "3px 15px",
fontSize: "10pt",
fontWeight: "bold",
}}
>
Primary server
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
<a
href={"http://bedbase.org"}
className="home-link"
style={{ fontSize: "10pt" }}
>
http://bedbase.org
</a>
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
Sheffield lab
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
Main demonstration server
</td>
</tr>
<tr style={{ verticalAlign: "top" }}>
<td
style={{
padding: "3px 15px",
fontSize: "10pt",
fontWeight: "bold",
}}
>
Dev server
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
<a
href={"http://dev1.bedbase.org"}
className="home-link"
style={{ fontSize: "10pt" }}
>
http://dev1.bedbase.org
</a>
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
Sheffield lab
</td>
<td style={{ padding: "3px 15px", fontSize: "10pt" }}>
Developmental server
</td>
</tr>
</tbody>
</table>
}
<Label
style={{
marginTop: "15px",
Expand Down Expand Up @@ -203,6 +289,7 @@ export default class BedCountsSpan extends React.Component {
<span style={{ color: "lightgray" }}>Loading data </span>
</>
)}

</div>
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions src/bedInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export default function BedInfo(props) {
}}
>
{value.label ===
"Mean absolute distance from transcription start sites" ? (
<>Mean absolute distance from TSS</>
"Median absolute distance from transcription start sites" ? (
<>Median TSS distance</>
) : (
<>{value.label}</>
)}
Expand Down
30 changes: 17 additions & 13 deletions src/bedSetSplash.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export default class BedSetSplash extends React.Component {
async componentDidMount() {
// get table schema via fastAPI
const bed_schema = await api
.get("/api/bed/all/schema")
.get("/api/bed/schema")
.then(({ data }) => data);
const bedset_schema = await api
.get("/api/bedset/all/schema")
.get("/api/bedset/schema")
.then(({ data }) => data);

// get bedsetsplash data via Graphql
Expand All @@ -59,8 +59,10 @@ export default class BedSetSplash extends React.Component {

let bedSetFile = []
Object.entries(res).forEach(([key, value], index) => {
console.log(key)
if (bedset_schema[key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)] &&
bedset_schema[key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)].type === "file") {
bedset_schema[key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)].type === "file" &&
key !== "bedsetIgdDatabasePath") {
bedSetFile.push({
id: key,
label: bedset_schema[key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)].label.replaceAll("_", " "),
Expand Down Expand Up @@ -131,19 +133,21 @@ export default class BedSetSplash extends React.Component {
hubFilePath:
"http://genome.ucsc.edu/cgi-bin/hgTracks?db=" +
JSON.parse(res.genome).alias +
"&hubUrl=http://data.bedbase.org/outputs/bedbuncher_output/" +
"&hubUrl=" +
bedhost_api_url +
"/api/bedset/" +
this.props.match.params.bedset_md5sum +
"/bedsetHub/hub.txt",
"/track_hub",
bedSetStat: [
{
label: bed_schema["gc_content"].description,
data: [avg.gc_content.toFixed(3), sd.gc_content.toFixed(3)],
},
{
label: bed_schema["mean_absolute_tss_dist"].description,
label: bed_schema["median_tss_dist"].description,
data: [
avg.mean_absolute_tss_dist.toFixed(3),
sd.mean_absolute_tss_dist.toFixed(3),
avg.median_tss_dist.toFixed(3),
sd.median_tss_dist.toFixed(3),
],
},
{
Expand Down Expand Up @@ -332,8 +336,8 @@ export default class BedSetSplash extends React.Component {
}}
>
{value.label ===
"Mean absolute distance from transcription start sites" ? (
<>Mean absolute distance from TSS</>
"Median absolute distance from transcription start sites" ? (
<>Median TSS distance</>
) : (
<>{value.label}</>
)}
Expand Down Expand Up @@ -403,7 +407,7 @@ export default class BedSetSplash extends React.Component {
bedhost_api_url +
"/api/bedset/" +
this.props.match.params.bedset_md5sum +
"/data"
"/metadata"
}
className="home-link"
style={{
Expand Down Expand Up @@ -439,7 +443,7 @@ export default class BedSetSplash extends React.Component {
bedhost_api_url +
"/api/bedset/" +
this.props.match.params.bedset_md5sum +
"/data?ids=bedset_means&ids=bedset_standard_deviation"
"/metadata?ids=bedset_means&ids=bedset_standard_deviation"
}
className="home-link"
style={{
Expand All @@ -457,7 +461,7 @@ export default class BedSetSplash extends React.Component {
bedhost_api_url +
"/api/bedset/" +
this.props.match.params.bedset_md5sum +
"/data?ids=region_commonality"
"/metadata?ids=region_commonality"
}
className="home-link"
style={{
Expand Down
2 changes: 1 addition & 1 deletion src/bedSetTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class BedSetTable extends React.Component {
});
} else if (i !== 0) {
if (
cols[i] === "meanAbsoluteTssDist" ||
cols[i] === "medianTssDist" ||
cols[i] === "meanRegionWidth"
) {
tableColumns.push({
Expand Down
2 changes: 1 addition & 1 deletion src/bedSplash.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class BedSplash extends React.Component {
}

async componentDidMount() {
let schema = await api.get("/api/bed/all/schema").then(({ data }) => data);
let schema = await api.get("/api/bed/schema").then(({ data }) => data);
this.setState({ bedSchema: schema });

await api
Expand Down
Loading