Skip to content

Commit

Permalink
Remove reference(s) to biosample.assay_type. See #7.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathancrabtree committed Sep 21, 2022
1 parent 9d0fb66 commit 44909f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
20 changes: 0 additions & 20 deletions c2m2_assessment/rubrics/NCE.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,26 +301,6 @@ def m_cfde_fair_11(CFDE, full=False, **kwargs):
'denominator': total_biosamples(CFDE),
}

#%%
@rubric.metric({
'@id': 'cfde_fair:12',
'name': 'biosamples with assay',
'description': 'What ratio of biosamples are associated with an assay',
})
def m_cfde_fair_12(CFDE, full=False, **kwargs):
total_biosamples_associated_with_assay = CFDE.tables['assay_type'] \
.link(CFDE.tables['biosample'], on=(
CFDE.tables['biosample'].assay_type == CFDE.tables['assay_type'].id
)) \
.groupby(CFDE.tables['biosample'].id_namespace, CFDE.tables['biosample'].local_id) \
.count()
value = (total_biosamples_associated_with_assay / total_biosamples(CFDE)) if total_biosamples(CFDE) else None
return {
'value': value,
'numerator': total_biosamples_associated_with_assay,
'denominator': total_biosamples(CFDE),
}

#%%
@rubric.metric({
'@id': 'cfde_fair:13',
Expand Down
3 changes: 1 addition & 2 deletions c2m2_assessment/rubrics/amanda2022.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_9')
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_10')
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_11')
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_12')
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_13')
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_14')
rubric.metric('c2m2_assessment.rubrics.NCE.m_cfde_fair_15')
Expand All @@ -36,4 +35,4 @@
rubric.metric('c2m2_assessment.rubrics.FAIR_2022_q4.m_cfde_fair_41')
rubric.metric('c2m2_assessment.rubrics.FAIR_2022_q4.m_cfde_fair_42')
rubric.metric('c2m2_assessment.rubrics.FAIR_2022_q4.m_cfde_fair_43')
rubric.metric('c2m2_assessment.rubrics.FAIR_2022_q4.m_cfde_fair_44')
rubric.metric('c2m2_assessment.rubrics.FAIR_2022_q4.m_cfde_fair_44')

0 comments on commit 44909f6

Please sign in to comment.