Summary
createCohortFromCriteria lets you create a cohort in project-test comprised of sequencing groups belonging to project (main). This results in broken cohorts, unusable because the sequencing groups and their associated assays etc are unusable within the scope of project-test. This is an easy error to make: pass a list of main/prod sg id's when creating a cohort in the dataset's -test project.
I would say this is unexpected behaviour.
what is expected
sequencing groups passed in sg_ids_internal are checked against the destination project for membership.
trying to create a cohort in a project containing one ore more sequencing groups not belonging to that project should result in an error.
what is observed
cohort creation proceeds without error, but with broken scope (note project is {dataset}-test, but cram path is gs://cpg-{dataset}-main/exome/cram/CPGXXXXX.cram:
"data": {
"cohorts": [
{
"name": "{dataset}-test-exome-twist-20260528-dragen",
"project": {
"dataset": "{dataset}",
"name": "{dataset}-test"
},
"sequencingGroups": [
{
"id": "CPGXXXXX",
"sample": {
"project": {
"name": "{dataset}"
}
},
"analyses": [
{
"outputs": {
"id": XXXXX,
"parent_id": null,
"path": "gs://cpg-{dataset}-main/exome/cram/CPGXXXXX.cram",
"basename": "CPGXXXXX.cram",
"dirname": "gs://cpg-{dataset}-main/exome/cram",
"nameroot": "CPGXXXXX",
"nameext": ".cram",
"file_checksum": "pziOag==",
"size": 921791013,
"meta": null,
"valid": true,
"secondary_files": {}
}
Summary
createCohortFromCriterialets you create a cohort inproject-testcomprised of sequencing groups belonging toproject(main). This results in broken cohorts, unusable because the sequencing groups and their associated assays etc are unusable within the scope ofproject-test. This is an easy error to make: pass a list of main/prod sg id's when creating a cohort in the dataset's-testproject.I would say this is unexpected behaviour.
what is expected
sequencing groups passed in
sg_ids_internalare checked against the destination project for membership.trying to create a cohort in a project containing one ore more sequencing groups not belonging to that project should result in an error.
what is observed
cohort creation proceeds without error, but with broken scope (note project is
{dataset}-test, but cram path isgs://cpg-{dataset}-main/exome/cram/CPGXXXXX.cram: