Skip to content

Commit 596cb7c

Browse files
authored
Merge pull request #165 from weng-lab/atacdata
added atac data
2 parents 5a03fd2 + d1c551c commit 596cb7c

File tree

7 files changed

+5529
-8269
lines changed

7 files changed

+5529
-8269
lines changed

screen2.0/src/app/applets/differential-gene-expression/queries.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export const ZSCORE_QUERY = gql`
2929
$gene_pc_end: Int
3030
$rank_ctcf_end: Float!
3131
$rank_ctcf_start: Float!
32+
$rank_atac_end: Float!
33+
$rank_atac_start: Float!
3234
$rank_dnase_end: Float!
3335
$rank_dnase_start: Float!
3436
$rank_enhancer_end: Float!
@@ -51,6 +53,8 @@ export const ZSCORE_QUERY = gql`
5153
gene_pc_end: $gene_pc_end
5254
rank_ctcf_end: $rank_ctcf_end
5355
rank_ctcf_start: $rank_ctcf_start
56+
rank_atac_end: $rank_atac_end
57+
rank_atac_start: $rank_atac_start
5458
rank_dnase_end: $rank_dnase_end
5559
rank_dnase_start: $rank_dnase_start
5660
rank_enhancer_end: $rank_enhancer_end

screen2.0/src/app/search/fetchRows.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ export async function generateRows(QueryResult: ApolloQueryResult<any>, biosampl
5252
end: (currentElement.start + currentElement.len).toLocaleString("en-US"),
5353
dnase: biosample ? currentElement.ctspecific.dnase_zscore : currentElement.dnase_zscore,
5454
//Need to get this data still from somewhere
55-
atac: "TBD",
55+
5656
h3k4me3: biosample ? currentElement.ctspecific.h3k4me3_zscore : currentElement.promoter_zscore,
5757
h3k27ac: biosample ? currentElement.ctspecific.h3k27ac_zscore : currentElement.enhancer_zscore,
5858
ctcf: biosample ? currentElement.ctspecific.ctcf_zscore : currentElement.ctcf_zscore,
59+
atac: biosample ? currentElement.ctspecific.atac_zscore : currentElement.atac_zscore,
5960
linkedGenes: { distancePC: currentElement.genesallpc.pc.intersecting_genes, distanceAll: currentElement.genesallpc.all.intersecting_genes, CTCF_ChIAPET: [], RNAPII_ChIAPET: [] },
6061
conservationData: {mammals: currentElement.mammals, primates: currentElement.primates, vertebrates: currentElement.vertebrates}
6162
})

screen2.0/src/app/search/search-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function passesChromatinFilter(currentElement: cCREData, biosample: string | nul
4444
const h3k4me3 = biosample ? currentElement.ctspecific.h3k4me3_zscore : currentElement.promoter_zscore
4545
const h3k27ac = biosample ? currentElement.ctspecific.h3k27ac_zscore : currentElement.enhancer_zscore
4646
const ctcf = biosample ? currentElement.ctspecific.ctcf_zscore : currentElement.ctcf_zscore
47+
const atac = biosample ? currentElement.ctspecific.atac_zscore : currentElement.atac_zscore
4748
if (
4849
mainQueryParams.dnase_s <= dnase &&
4950
dnase <= mainQueryParams.dnase_e &&
@@ -52,7 +53,7 @@ function passesChromatinFilter(currentElement: cCREData, biosample: string | nul
5253
mainQueryParams.h3k27ac_s <= h3k27ac &&
5354
h3k27ac <= mainQueryParams.h3k27ac_e &&
5455
mainQueryParams.ctcf_s <= ctcf &&
55-
ctcf <= mainQueryParams.ctcf_e
56+
ctcf <= mainQueryParams.ctcf_e
5657
) {
5758
return true
5859
} else return false

screen2.0/src/app/search/types.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type cCREData = {
1111
start: number
1212
len: number
1313
dnase_zscore?: number
14-
atac: string
14+
atac_zscore?: number
1515
promoter_zscore?: number
1616
enhancer_zscore?: number
1717
ctcf_zscore?: number
@@ -24,6 +24,7 @@ export type cCREData = {
2424
h3k4me3_zscore?: number
2525
h3k27ac_zscore?: number
2626
ctcf_zscore?: number
27+
atac_zscore?: number
2728
}
2829
genesallpc: {
2930
all: {
@@ -59,6 +60,8 @@ export type MainQueryParams = {
5960
h3k4me3_e?: number
6061
h3k27ac_s?: number
6162
h3k27ac_e?: number
63+
atac_s?: number
64+
atac_e?: number
6265
vert_s?: number
6366
vert_e?: number
6467
mamm_s?: number
@@ -132,7 +135,7 @@ export type MainResultTableRow = {
132135
start: string
133136
end: string
134137
dnase?: number
135-
atac: string
138+
atac?: number
136139
h3k4me3?: number
137140
h3k27ac?: number
138141
ctcf?: number

screen2.0/src/common/components/MainResultsTable.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,9 @@ function MainResultsTable(props: MainResultsTableProps) {
4141
{
4242
header: "End",
4343
value: (row: { end: string }) => row.end,
44-
},
45-
{
46-
header: "ATAC",
47-
//Atac is a string because the data does not exist and is "TBD" for now
48-
value: (row: { atac: string }) => row.atac,
49-
},
44+
}
5045
]
51-
46+
5247
if (props.rows[0] && props.rows[0].dnase !== null) {
5348
cols.push({
5449
header: "DNase",
@@ -73,7 +68,12 @@ function MainResultsTable(props: MainResultsTableProps) {
7368
value: (row) => (row.h3k4me3 && row.h3k4me3.toFixed(2)) || 0,
7469
})
7570
}
76-
71+
if (props.rows[0] && props.rows[0].atac !== null) {
72+
cols.push({
73+
header: "ATAC",
74+
value: (row) => (row.atac && row.atac.toFixed(2)) || 0,
75+
})
76+
}
7777
//Whenever the state of the checkboxes conflicts with the state of the main component, it triggers a rerender
7878
cols.push({
7979
header: "Linked\u00A0Genes\u00A0(Distance)",
@@ -207,14 +207,14 @@ function MainResultsTable(props: MainResultsTableProps) {
207207
<LoadingMessage />
208208
:
209209
<DataTable
210-
key={props.rows[0] && props.rows[0].dnase + props.rows[0].ctcf + props.rows[0].h3k27ac + props.rows[0].h3k4me3 + columns.toString() + distance + CTCF_ChIAPET + RNAPII_ChIAPET}
210+
key={props.rows[0] && props.rows[0].dnase + props.rows[0].ctcf + props.rows[0].h3k27ac + props.rows[0].h3k4me3 + props.rows[0].atac + columns.toString() + distance + CTCF_ChIAPET + RNAPII_ChIAPET}
211211
rows={props.rows}
212212
columns={columns(setDistance, setCTCF_ChIAPET, setRNAPII_ChIAPET)}
213213
itemsPerPage={props.itemsPerPage}
214214
searchable
215215
onRowClick={props.onRowClick}
216216
tableTitle={props.tableTitle}
217-
sortColumn={6}
217+
sortColumn={5}
218218
showMoreColumns
219219
noOfDefaultColumns={11}
220220
titleHoverInfo={props.titleHoverInfo}

screen2.0/src/common/lib/queries.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ query ccreSearchQuery(
2727
$rank_enhancer_start: Float!
2828
$rank_promoter_end: Float!
2929
$rank_promoter_start: Float!
30+
$rank_atac_end: Float!
31+
$rank_atac_start: Float!
3032
$mammals_min: Float
3133
$mammals_max: Float
3234
$vertebrates_min: Float
@@ -48,6 +50,8 @@ query ccreSearchQuery(
4850
gene_all_end: $gene_all_end
4951
gene_pc_start: $gene_pc_start
5052
gene_pc_end: $gene_pc_end
53+
rank_atac_end: $rank_atac_end
54+
rank_atac_start: $rank_atac_start
5155
rank_ctcf_end: $rank_ctcf_end
5256
rank_ctcf_start: $rank_ctcf_start
5357
rank_dnase_end: $rank_dnase_end
@@ -76,12 +80,14 @@ query ccreSearchQuery(
7680
dnase_zscore
7781
enhancer_zscore
7882
promoter_zscore
83+
atac_zscore
7984
ctspecific {
8085
ct
8186
dnase_zscore
8287
h3k4me3_zscore
8388
h3k27ac_zscore
8489
ctcf_zscore
90+
atac_zscore
8591
}
8692
info {
8793
accession
@@ -211,6 +217,8 @@ function cCRE_QUERY_VARIABLES(assembly: string, chromosome: string, start: numbe
211217
gene_pc_end: 5000000,
212218
rank_dnase_start: -10,
213219
rank_dnase_end: 10,
220+
rank_atac_start: -10,
221+
rank_atac_end: 10,
214222
rank_promoter_start: -10,
215223
rank_promoter_end: 10,
216224
rank_enhancer_start: -10,

0 commit comments

Comments
 (0)