Skip to content

added atac data #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export const ZSCORE_QUERY = gql`
$gene_pc_end: Int
$rank_ctcf_end: Float!
$rank_ctcf_start: Float!
$rank_atac_end: Float!
$rank_atac_start: Float!
$rank_dnase_end: Float!
$rank_dnase_start: Float!
$rank_enhancer_end: Float!
Expand All @@ -51,6 +53,8 @@ export const ZSCORE_QUERY = gql`
gene_pc_end: $gene_pc_end
rank_ctcf_end: $rank_ctcf_end
rank_ctcf_start: $rank_ctcf_start
rank_atac_end: $rank_atac_end
rank_atac_start: $rank_atac_start
rank_dnase_end: $rank_dnase_end
rank_dnase_start: $rank_dnase_start
rank_enhancer_end: $rank_enhancer_end
Expand Down
3 changes: 2 additions & 1 deletion screen2.0/src/app/search/fetchRows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ export async function generateRows(QueryResult: ApolloQueryResult<any>, biosampl
end: (currentElement.start + currentElement.len).toLocaleString("en-US"),
dnase: biosample ? currentElement.ctspecific.dnase_zscore : currentElement.dnase_zscore,
//Need to get this data still from somewhere
atac: "TBD",

h3k4me3: biosample ? currentElement.ctspecific.h3k4me3_zscore : currentElement.promoter_zscore,
h3k27ac: biosample ? currentElement.ctspecific.h3k27ac_zscore : currentElement.enhancer_zscore,
ctcf: biosample ? currentElement.ctspecific.ctcf_zscore : currentElement.ctcf_zscore,
atac: biosample ? currentElement.ctspecific.atac_zscore : currentElement.atac_zscore,
linkedGenes: { distancePC: currentElement.genesallpc.pc.intersecting_genes, distanceAll: currentElement.genesallpc.all.intersecting_genes, CTCF_ChIAPET: [], RNAPII_ChIAPET: [] },
conservationData: {mammals: currentElement.mammals, primates: currentElement.primates, vertebrates: currentElement.vertebrates}
})
Expand Down
3 changes: 2 additions & 1 deletion screen2.0/src/app/search/search-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function passesChromatinFilter(currentElement: cCREData, biosample: string | nul
const h3k4me3 = biosample ? currentElement.ctspecific.h3k4me3_zscore : currentElement.promoter_zscore
const h3k27ac = biosample ? currentElement.ctspecific.h3k27ac_zscore : currentElement.enhancer_zscore
const ctcf = biosample ? currentElement.ctspecific.ctcf_zscore : currentElement.ctcf_zscore
const atac = biosample ? currentElement.ctspecific.atac_zscore : currentElement.atac_zscore
if (
mainQueryParams.dnase_s <= dnase &&
dnase <= mainQueryParams.dnase_e &&
Expand All @@ -52,7 +53,7 @@ function passesChromatinFilter(currentElement: cCREData, biosample: string | nul
mainQueryParams.h3k27ac_s <= h3k27ac &&
h3k27ac <= mainQueryParams.h3k27ac_e &&
mainQueryParams.ctcf_s <= ctcf &&
ctcf <= mainQueryParams.ctcf_e
ctcf <= mainQueryParams.ctcf_e
) {
return true
} else return false
Expand Down
7 changes: 5 additions & 2 deletions screen2.0/src/app/search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type cCREData = {
start: number
len: number
dnase_zscore?: number
atac: string
atac_zscore?: number
promoter_zscore?: number
enhancer_zscore?: number
ctcf_zscore?: number
Expand All @@ -24,6 +24,7 @@ export type cCREData = {
h3k4me3_zscore?: number
h3k27ac_zscore?: number
ctcf_zscore?: number
atac_zscore?: number
}
genesallpc: {
all: {
Expand Down Expand Up @@ -59,6 +60,8 @@ export type MainQueryParams = {
h3k4me3_e?: number
h3k27ac_s?: number
h3k27ac_e?: number
atac_s?: number
atac_e?: number
vert_s?: number
vert_e?: number
mamm_s?: number
Expand Down Expand Up @@ -132,7 +135,7 @@ export type MainResultTableRow = {
start: string
end: string
dnase?: number
atac: string
atac?: number
h3k4me3?: number
h3k27ac?: number
ctcf?: number
Expand Down
20 changes: 10 additions & 10 deletions screen2.0/src/common/components/MainResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,9 @@ function MainResultsTable(props: MainResultsTableProps) {
{
header: "End",
value: (row: { end: string }) => row.end,
},
{
header: "ATAC",
//Atac is a string because the data does not exist and is "TBD" for now
value: (row: { atac: string }) => row.atac,
},
}
]

if (props.rows[0] && props.rows[0].dnase !== null) {
cols.push({
header: "DNase",
Expand All @@ -73,7 +68,12 @@ function MainResultsTable(props: MainResultsTableProps) {
value: (row) => (row.h3k4me3 && row.h3k4me3.toFixed(2)) || 0,
})
}

if (props.rows[0] && props.rows[0].atac !== null) {
cols.push({
header: "ATAC",
value: (row) => (row.atac && row.atac.toFixed(2)) || 0,
})
}
//Whenever the state of the checkboxes conflicts with the state of the main component, it triggers a rerender
cols.push({
header: "Linked\u00A0Genes\u00A0(Distance)",
Expand Down Expand Up @@ -207,14 +207,14 @@ function MainResultsTable(props: MainResultsTableProps) {
<LoadingMessage />
:
<DataTable
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}
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}
rows={props.rows}
columns={columns(setDistance, setCTCF_ChIAPET, setRNAPII_ChIAPET)}
itemsPerPage={props.itemsPerPage}
searchable
onRowClick={props.onRowClick}
tableTitle={props.tableTitle}
sortColumn={6}
sortColumn={5}
showMoreColumns
noOfDefaultColumns={11}
titleHoverInfo={props.titleHoverInfo}
Expand Down
8 changes: 8 additions & 0 deletions screen2.0/src/common/lib/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ query ccreSearchQuery(
$rank_enhancer_start: Float!
$rank_promoter_end: Float!
$rank_promoter_start: Float!
$rank_atac_end: Float!
$rank_atac_start: Float!
$mammals_min: Float
$mammals_max: Float
$vertebrates_min: Float
Expand All @@ -48,6 +50,8 @@ query ccreSearchQuery(
gene_all_end: $gene_all_end
gene_pc_start: $gene_pc_start
gene_pc_end: $gene_pc_end
rank_atac_end: $rank_atac_end
rank_atac_start: $rank_atac_start
rank_ctcf_end: $rank_ctcf_end
rank_ctcf_start: $rank_ctcf_start
rank_dnase_end: $rank_dnase_end
Expand Down Expand Up @@ -76,12 +80,14 @@ query ccreSearchQuery(
dnase_zscore
enhancer_zscore
promoter_zscore
atac_zscore
ctspecific {
ct
dnase_zscore
h3k4me3_zscore
h3k27ac_zscore
ctcf_zscore
atac_zscore
}
info {
accession
Expand Down Expand Up @@ -211,6 +217,8 @@ function cCRE_QUERY_VARIABLES(assembly: string, chromosome: string, start: numbe
gene_pc_end: 5000000,
rank_dnase_start: -10,
rank_dnase_end: 10,
rank_atac_start: -10,
rank_atac_end: 10,
rank_promoter_start: -10,
rank_promoter_end: 10,
rank_enhancer_start: -10,
Expand Down
Loading