-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
439 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import axios from 'axios'; | ||
import styled from 'styled-components'; | ||
import CustomMessages from '../Shared/CustomMessages'; | ||
import CustomSelect from '../Shared/CustomSelect'; | ||
import CustomInputText from '../Shared/CustomInputText'; | ||
import { InputTextarea } from 'primereact/inputtextarea'; | ||
import {dataTypes} from '../Shared/Enums'; | ||
|
||
const StyledAddNewObject = styled.div` | ||
width: 800px; | ||
`; | ||
|
||
const AddNewObject = () => { | ||
|
||
const [selected, setSelected] = useState(null); | ||
const [datasetName, setDatasetName] = useState(''); | ||
const [datasetNote, setDatasetNote] = useState(''); | ||
const [dataset, setDataset] = useState(''); | ||
const [dataObj, setDataObj] = useState(''); | ||
|
||
useEffect(() => { | ||
if(selected){ | ||
|
||
} | ||
}, [selected]) | ||
|
||
return( | ||
<StyledAddNewObject> | ||
<h3>Add new data object to the compendium</h3> | ||
<div> | ||
<CustomSelect | ||
selectOne | ||
selected={selected} | ||
options={Object.values(dataTypes).map(datatype => ({label: datatype, value: datatype}))} | ||
onChange={(e) => {setSelected(e.value)}} | ||
label='Select a dataset type to add: ' | ||
/> | ||
</div> | ||
<div> | ||
<CustomInputText | ||
className='textfield' | ||
label='Dataset name:' | ||
value={datasetName} | ||
onChange={(e) => {setDatasetName( e.target.value)}} | ||
/> | ||
</div> | ||
<h4>Add a DatasetNote document</h4> | ||
<div> | ||
<InputTextarea value={datasetNote} onChange={(e) => setDatasetNote(e.target.value)} rows={10} cols={100} /> | ||
</div> | ||
<h4>Add a Dataset document</h4> | ||
<div> | ||
<InputTextarea value={dataset} onChange={(e) => setDataset(e.target.value)} rows={30} cols={100} /> | ||
</div> | ||
<h4>Add a DataObject document</h4> | ||
<div> | ||
<InputTextarea value={dataObj} onChange={(e) => setDataObj(e.target.value)} rows={30} cols={100} /> | ||
</div> | ||
</StyledAddNewObject> | ||
) | ||
} | ||
|
||
export default AddNewObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
client/src/components/Admin/JSONStructures/dataobject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
export const baseDataObject = { | ||
info: { | ||
date: { | ||
created: { | ||
$date: "2023-00-00T00:00:00.000Z" | ||
} | ||
}, | ||
status: "complete", | ||
private: false, | ||
canonical: true, | ||
numDownload: 0, | ||
createdBy: "BHK Lab", | ||
other: { | ||
pipeline: { | ||
url: "", | ||
commit_id: "" | ||
}, | ||
additionalRepo: [ | ||
{ | ||
repo_type: "", | ||
git_url: "", | ||
commit_id: "" | ||
} | ||
], | ||
data_preprocessing: [ | ||
{ | ||
data_type: "", | ||
pipeline: { | ||
git_url: "", | ||
commit_id: "" | ||
} | ||
} | ||
], | ||
rna_ref: "" | ||
} | ||
}, | ||
dataObjType: "BaseDataObject", | ||
datasetType: "", | ||
name: "", | ||
dataset: { | ||
$oid: "" | ||
}, | ||
repositories: [ | ||
{ | ||
version: "1.0", | ||
doi: "", | ||
downloadLink: "", | ||
} | ||
], | ||
availableDatatypes: [ | ||
{ | ||
name: "rnaseq", | ||
genomeType: "RNA" | ||
} | ||
], | ||
} | ||
|
||
export const genomeDataObject = { | ||
info: { | ||
date: { | ||
created: { | ||
$date: "2023-00-00T00:00:00.000Z" | ||
} | ||
}, | ||
status: "complete", | ||
private: false, | ||
canonical: true, | ||
numDownload: 0, | ||
createdBy: "BHK Lab", | ||
filteredSensitivity: true, | ||
other: { | ||
pipeline: { | ||
url: "", | ||
commit_id: "" | ||
}, | ||
additionalRepo: [ | ||
{ | ||
repo_type: "", | ||
git_url: "", | ||
commit_id: "" | ||
} | ||
], | ||
data_preprocessing: [ | ||
{ | ||
data_type: "", | ||
pipeline: { | ||
git_url: "", | ||
commit_id: "" | ||
} | ||
} | ||
], | ||
rna_ref: "" | ||
} | ||
}, | ||
dataObjType: "GenomeDataObject", | ||
datasetType: "", | ||
name: "", | ||
dataset: { | ||
$oid: "" | ||
}, | ||
repositories: [ | ||
{ | ||
version: "3.13", | ||
doi: "", | ||
downloadLink: "" | ||
} | ||
], | ||
availableDatatypes: [ | ||
{ | ||
name: "rnaseq", | ||
genomeType: "RNA" | ||
}, | ||
{ | ||
name: "microarray", | ||
genomeType: "RNA" | ||
}, | ||
{ | ||
name: "cnv", | ||
genomeType: "DNA" | ||
}, | ||
{ | ||
name: "fusion", | ||
genomeType: "DNA" | ||
}, | ||
{ | ||
name: "mutation", | ||
genomeType: "DNA" | ||
} | ||
], | ||
tools: { | ||
rna: "kallisto_0_46_1" | ||
}, | ||
references: { | ||
rna: "Gencode_v33" | ||
}, | ||
genome: "GRCh38", | ||
} |
Oops, something went wrong.