Skip to content
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

Update to structural variant data format #4057

Merged
merged 7 commits into from
Jun 25, 2019

Conversation

sandertan
Copy link
Contributor

@sandertan sandertan commented Apr 3, 2018

What? Why?

This new format will have support for detailed fusion data, with the goal of drawing fusion breakpoint events in a new fusion tab.

This PR contains 3 main commits, which were reviewed in separate PRs.

RFC: RFC 31_b

Backend changes to DB schema, importer, and validator

  • Update database schema
  • Create importer for structural variants
  • Create validator for structural variants
  • Add specific validation for fusion events
  • Add representable test data to study_es_0
  • Remove old structural variant functionality (which was not used)

Column names: New, old and updated column names in all separate layers (data, database, java) can be found in this Google Sheets doc.

This is a fresh PR, after closing the slightly cluttered PR #3398.

Copy link
Contributor

@oplantalech oplantalech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't test if the test study loads, but for now there is at least something in the migration sql that you need to fix. The rest looks good.

db-scripts/src/main/resources/migration.sql Outdated Show resolved Hide resolved
db-scripts/src/main/resources/migration.sql Show resolved Hide resolved
Copy link
Member

@pieterlukasse pieterlukasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add respective tests to TestIntegrationTest.java. @oplantalech can work on this.

@sandertan sandertan force-pushed the structural_variant_data_format branch from 8224415 to 3b37d07 Compare May 18, 2018 11:26
@rnugraha rnugraha force-pushed the structural_variant_data_format branch from 35ae61a to 3cc23ad Compare May 23, 2018 09:13
@sandertan sandertan force-pushed the structural_variant_data_format branch from 3cc23ad to 54c6315 Compare May 24, 2018 13:38
private StructuralVariantRepository structuralVariantRepository;

@Override
public List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds,
Copy link
Member

@pieterlukasse pieterlukasse May 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to have another endpoint to fetch structural variants by type, "FUSION" being one of the types. The types can be found in the EVENT_INFO column.

Please start a list of SV types. List can be 1 long for now, with only FUSION. Add a webservice that supports a type parameter and use the given type to query the EVENT_INFO column.

@rnugraha could then use this endpoint in the fusions tab.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@sandertan sandertan force-pushed the structural_variant_data_format branch 4 times, most recently from c029c45 to b136fa8 Compare May 25, 2018 15:15
@rnugraha rnugraha force-pushed the structural_variant_data_format branch from b136fa8 to 860816a Compare May 30, 2018 10:28
@sandertan sandertan force-pushed the structural_variant_data_format branch from 860816a to b136fa8 Compare May 31, 2018 08:25
@rnugraha rnugraha force-pushed the structural_variant_data_format branch from b136fa8 to 1c26cd6 Compare May 31, 2018 08:39
@sandertan
Copy link
Contributor Author

I've added a commit with code to test the structural variant importer and update the integration test to include structural variant data.

Copy link
Contributor

@oplantalech oplantalech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All works, great job!

@sandertan sandertan force-pushed the structural_variant_data_format branch from b3c9a68 to 3d45344 Compare June 4, 2018 12:08
@rnugraha rnugraha force-pushed the structural_variant_data_format branch 4 times, most recently from 94e9241 to df68038 Compare June 18, 2018 08:49
@rnugraha rnugraha force-pushed the structural_variant_data_format branch from a0e9635 to c06f26a Compare June 26, 2018 10:01
@oplantalech oplantalech force-pushed the structural_variant_data_format branch from b9ed02e to 1144243 Compare June 6, 2019 15:20
@oplantalech
Copy link
Contributor

oplantalech commented Jun 7, 2019

@n1zea144 @sheridancbio @khzhu Hi guys, I have rebased this PR - it took quite some time because it has been stuck for a lot of time, more than a year! So it would be really good if you can review as soon as possible to speed the merging process up: this is the backend for the new fusion tab functionality.

@oplantalech oplantalech force-pushed the structural_variant_data_format branch from b77ebbd to d05e211 Compare June 7, 2019 09:06
@oplantalech oplantalech force-pushed the structural_variant_data_format branch from d05e211 to 0b8e796 Compare June 12, 2019 08:32
@sheridancbio
Copy link
Contributor

@oplantalech reminded me that this PR is awaiting review / merge. Apologies for letting it fall off the radar. I talked with @n1zea144 and we think we will be able to work the review of this PR into our next weekly sprint (starting June 19).

@pieterlukasse
Copy link
Member

excellent! Thanks @sheridancbio!

@oplantalech oplantalech force-pushed the structural_variant_data_format branch from 0b8e796 to 66d55f8 Compare June 19, 2019 12:35
Copy link
Contributor

@ao508 ao508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some comments and questions with some concerns I had while making a first pass on this pr.

Main points:

  • The SV mapper/repository beans were removed from the application context business/dao files. Was this intentional? I thought they needed to be there like the other mappers/repositorys for mybatis. Please correct me if I'm wrong though / if I'm misunderstanding.
  • There is only an add method in the SV DAO. Is this because we only ever expect to use the DAO to add records and the SV repository/mapper for fetching? I wonder if we might need to add a fetcher to the DAO at some point or another before we finally move away from the core package for imports. I don't think it'd hurt to have a fetcher method in the DAO but I'm also fine leaving it out if there really is no need for having it there.
  • CancerStudy has a hasFusionData() method. I suggested adding a check for datatype FUSION as well since the portal is still supporting that datatype.
  • Please consider modularizing the SV importer class to make it easier to read
  • I pointed out an unmerged file, probably leftover from a rebase attempt.

Other comments:
I think the validator updates and the test classes / cases looked good.

Let me know if you have any questions.

@@ -53,14 +53,6 @@
<property name="mutationalSignatureMapper" ref="mutationalSignatureMapper" />
</bean>

<bean id="structuralVariantMapper" class="org.mybatis.spring.mapper.MapperFactoryBean">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self (nts): purpose of removal?

"DRIVER_TIERS_FILTER",
"DRIVER_TIERS_FILTER_ANNOTATION",
};
bl.setFieldNames(fieldNames );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

db-scripts/src/main/resources/migration.sql Outdated Show resolved Hide resolved
private StructuralVariantRepository structuralVariantRepository;

@Override
public List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@Autowired
private StructuralVariantService structuralVariantService;

@RequestMapping(value = "/structuralvariant/fetch", method = RequestMethod.POST,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also require a user permissions check?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I have searched how is permission implemented in other endpoints and I am a bit confused: what is the difference between @PreAuthorize and @PostFilter? And why is permission sometimes implemented the service layer and in others it is in the Controller layer? Do you know it?

@oplantalech
Copy link
Contributor

@ao508 Thank you very much for your review. I think I have answered/fixed all your issues except the removal of SV mapper/repository beans from the application context business/dao files: business is part of the old API and we have moved the files to the API layer which is part of the new API.

Now you should have all answers, feel free to reply if there are unsolved issues or otherwise approve the PR 😃

Copy link
Contributor

@ao508 ao508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@oplantalech oplantalech force-pushed the structural_variant_data_format branch from d245a15 to 29c8faf Compare June 25, 2019 08:00
@ao508 ao508 merged commit 8398be8 into cBioPortal:rc Jun 25, 2019
@jjgao
Copy link
Member

jjgao commented Jun 28, 2019

@khzhu could you create a new issue for this and assign to @oplantalech ?

@khzhu
Copy link
Contributor

khzhu commented Jun 28, 2019

@JJ, sure. I will remove comment and open a new issue. thanks!

@oplantalech oplantalech deleted the structural_variant_data_format branch November 22, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.