Skip to content

Commit 0630f52

Browse files
authored
Merge pull request #278 from MoTrPAC/276_CT_Methylcap_Seq
Add MethylCap-seq Tab to QC Data Monitor
2 parents e088f92 + e267b53 commit 0630f52

8 files changed

+46
-20
lines changed

README.md

+5-11
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737
#### Building and running
3838

3939
* Preparation:
40-
- Set `node` environment to `14.15.x`, or use `nvm` to run `nvm use v14.15.4`
40+
- Set `node` environment to `16.20.x`, or use `nvm` to run `nvm use v16.20.0`
4141
- If `node_modules` directory already exist in your local working copy, run `rm -fr node_modules/` and `rm -f yarn.lock`.
4242
- Create a `.env` file at the root of the local working copy and add `ESLINT_NO_DEV_ERRORS=true`.
43+
- Add additional required environment variables to the `.env` file in root (e.g. the API service address)
4344
- Run `yarn install`.
4445

4546
* Building CSS: Uses sass in `node_modules/sass/sass.js`
@@ -70,9 +71,10 @@
7071

7172
#### Software:
7273

73-
* [Node v14](https://github.com/nodejs/Release)
74+
* [Node v16](https://github.com/nodejs/Release)
7475
- Check your version: `node --version`
75-
- If the version is not 14, you can `brew install node@14` or use [nvm](https://github.com/creationix/nvm/blob/master/README.md#installation), the Node Version Manager
76+
- If the version is not 16, you can `brew install node@16` or use [nvm](https://github.
77+
com/creationix/nvm/blob/master/README.md#installation), the Node Version Manager
7678

7779
* [React v16](https://reactjs.org/versions)
7880
- Storybook used to visualize individual UI components
@@ -108,14 +110,6 @@
108110
- Makes call to backend for a list of uploads (size depending maxRows variable) on a given page. Expects backend to give total count of uploads fitting filters and the uploads for a specific page. (e.g on page 2, with 10 rows per page, expects items 11-20 from backend and a count of all rows that fit current filters)
109111
- Changing filters should also call backend
110112

111-
#### Samir's Flow for Creating Custom Font Icons
112-
1. Create a 200px by 200px artboard in Adobe Illustrator
113-
2. Draw Icon and export artboard as SVG (make sure only one color -- white counts as a color but transparent does not)
114-
3. Upload all icons to [IcoMoon](https://icomoon.io/app/#/select) 4. Download and unzip resultant zipped file
115-
5. Copy contents of the fonts folder (icomoon.eot, icomoon.woff, icomoon.svg, icomoon.tff) and place them in the src/assets/fonts folder overwriting the previous file.
116-
117-
- Make sure you upload ALL custom icons to icomoon so that previously created icons are still accessible
118-
119113
---
120114

121115
Cross-browser Testing Platform and Open Source ❤️ provided by [Sauce Labs][homepage]

src/DataStatusPage/common.jsx

+14-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const commonReportPropType = {
2020
};
2121

2222
/**
23-
* props common to rna-seq, rrbs, atac-seq, and immunoassay
23+
* props common to rna-seq, rrbs, atac-seq, methylcap-seq, and immunoassay
2424
* QC data reports
2525
*/
2626
export const getDataReportPropType = {
@@ -57,7 +57,7 @@ export const metabProtRawDataReportPropType = {
5757
};
5858

5959
/**
60-
* column headers common to rna-seq, rrbs, and atac-seq
60+
* column headers common to rna-seq, rrbs, methylcap-seq, and atac-seq
6161
* data qc status reports
6262
*/
6363
export const getDataTableColumns = [
@@ -635,10 +635,19 @@ export const transformData = (arr, qcFiles, omicType) => {
635635
*/
636636
export function retrieveReport(e, filename) {
637637
e.preventDefault();
638-
const api = process.env.REACT_APP_API_SERVICE_ADDRESS;
638+
const api =
639+
process.env.NODE_ENV !== 'production'
640+
? process.env.REACT_APP_API_SERVICE_ADDRESS_DEV
641+
: process.env.REACT_APP_API_SERVICE_ADDRESS;
639642
const endpoint = process.env.REACT_APP_SIGNED_URL_ENDPOINT;
640-
const key = process.env.REACT_APP_API_SERVICE_KEY;
641-
const bucket = process.env.REACT_APP_QC_REPORT_BUCKET;
643+
const key =
644+
process.env.NODE_ENV !== 'production'
645+
? process.env.REACT_APP_API_SERVICE_KEY_DEV
646+
: process.env.REACT_APP_API_SERVICE_KEY;
647+
const bucket =
648+
process.env.NODE_ENV !== 'production'
649+
? process.env.REACT_APP_QC_REPORT_BUCKET_DEV
650+
: process.env.REACT_APP_QC_REPORT_BUCKET;
642651
return axios
643652
.get(`${api}${endpoint}?bucket=${bucket}&object=${filename}&key=${key}`)
644653
.then((response) => {

src/DataStatusPage/dataStatusActions.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,15 @@ function useNull() {
3737
return null;
3838
}
3939

40-
const api = process.env.REACT_APP_API_SERVICE_ADDRESS;
40+
const api =
41+
process.env.NODE_ENV !== 'production'
42+
? process.env.REACT_APP_API_SERVICE_ADDRESS_DEV
43+
: process.env.REACT_APP_API_SERVICE_ADDRESS;
4144
const endpoint = process.env.REACT_APP_QC_DATA_ENDPOINT;
42-
const key = process.env.REACT_APP_API_SERVICE_KEY;
45+
const key =
46+
process.env.NODE_ENV !== 'production'
47+
? process.env.REACT_APP_API_SERVICE_KEY_DEV
48+
: process.env.REACT_APP_API_SERVICE_KEY;
4349

4450
// Handler for predefined searches
4551
function fetchData() {
@@ -62,6 +68,7 @@ function fetchData() {
6268
axios.get(`${api}${endpoint}/immunoassay?key=${key}`).catch(useNull),
6369
axios.get(`${api}${endpoint}/rna_seq?key=${key}`).catch(useNull),
6470
axios.get(`${api}${endpoint}/rrbs?key=${key}`).catch(useNull),
71+
axios.get(`${api}${endpoint}/methylcap_seq?key=${key}`).catch(useNull),
6572
axios.get(`${api}${endpoint}/atac_seq?key=${key}`).catch(useNull),
6673
])
6774
.then(
@@ -74,6 +81,7 @@ function fetchData() {
7481
immunoAssay,
7582
rnaSeq,
7683
rrbs,
84+
methylcapSeq,
7785
atacSeq
7886
) => {
7987
const payload = {
@@ -84,6 +92,7 @@ function fetchData() {
8492
immunoAssay: immunoAssay.data,
8593
rnaSeq: rnaSeq.data,
8694
rrbs: rrbs.data,
95+
methylcapSeq: methylcapSeq.data,
8796
atacSeq: atacSeq.data,
8897
lastModified: dayjs().format(),
8998
};

src/DataStatusPage/dataStatusPage.jsx

+9
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ export function DataStatusPage({
101101
<QcReportHelpLink qcReportViewChange={qcReportViewChange} />
102102
</>
103103
);
104+
case 'methylcapseq':
105+
return (
106+
<>
107+
<StatusReportGetData qcData={qcData.methylcapSeq} />
108+
<QcReportHelpLink qcReportViewChange={qcReportViewChange} />
109+
</>
110+
);
104111
case 'atacseq':
105112
return (
106113
<>
@@ -154,6 +161,7 @@ DataStatusPage.propTypes = {
154161
proteomicsRaw: PropTypes.arrayOf(PropTypes.object),
155162
rnaSeq: PropTypes.arrayOf(PropTypes.object),
156163
rrbs: PropTypes.arrayOf(PropTypes.object),
164+
methylcapSeq: PropTypes.arrayOf(PropTypes.object),
157165
lastModified: PropTypes.string,
158166
}),
159167
isFetchingQcData: PropTypes.bool,
@@ -174,6 +182,7 @@ DataStatusPage.defaultProps = {
174182
proteomicsRaw: [],
175183
rnaSeq: [],
176184
rrbs: [],
185+
methylcapSeq: [],
177186
lastModified: '',
178187
},
179188
isFetchingQcData: false,

src/DataStatusPage/dataStatusReducer.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const defaultDataStatusState = {
1616
proteomicsRaw: [],
1717
rnaSeq: [],
1818
rrbs: [],
19+
methylcapSeq: [],
1920
lastModified: '',
2021
},
2122
errMsg: '',

src/DataStatusPage/qcReportHelp.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function QcReportHelp() {
268268
</ul>
269269
</li>
270270
</ul>
271-
<h4 className="mt-4">RNA-seq, RRBS, and ATAC-seq</h4>
271+
<h4 className="mt-4">RNA-seq, RRBS, MethylCap-seq, and ATAC-seq</h4>
272272
<h6>Terms & Definitions</h6>
273273
<ul className="terms-definitions">
274274
<li>

src/DataStatusPage/sharelib/qcReportButtonList.js

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ const qcReportButtonList = [
1919
qcReport: 'rrbs',
2020
buttonLabel: 'RRBS',
2121
},
22+
{
23+
qcReport: 'methylcapseq',
24+
buttonLabel: 'MethylCap-seq',
25+
},
2226
{
2327
qcReport: 'atacseq',
2428
buttonLabel: 'ATAC-seq',

src/DataStatusPage/sharelib/qcReportByPhaseOmicPrefix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Static function to prepend prefix GET, METAB, or PROT to y-axis CAS/assay labels
22
function selectOmicPrefix(assay) {
33
let omicPrefix = 'METAB';
4-
const patternGet = /rna-seq|rrbs|atac-seq/;
4+
const patternGet = /rna[-_]?seq|rrbs|atac[-_]?seq|methylcap[-_]?seq/;
55
if (assay.toLowerCase().match(patternGet)) {
66
omicPrefix = 'GET';
77
}

0 commit comments

Comments
 (0)