Skip to content

[BI-873] Remove crosses from the germplasm importer#86

Merged
ctucker3 merged 5 commits intodevelopfrom
bug/BI-873
May 13, 2021
Merged

[BI-873] Remove crosses from the germplasm importer#86
ctucker3 merged 5 commits intodevelopfrom
bug/BI-873

Conversation

@ctucker3
Copy link
Contributor

@ctucker3 ctucker3 commented May 5, 2021

Removed the crosses from the germplasm importer and handled pedigrees through the pedigree string.

Tested against BreedBase and everything works well.

@github-actions github-actions bot added the bug Something isn't working label May 5, 2021
@ctucker3 ctucker3 marked this pull request as ready for review May 5, 2021 17:51
germplasmSearch.germplasmNames(germplasmNames);
// Germplasm doesn't have program attached. Do species as next best thing
germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName()));
//germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName()));
Copy link
Member

Choose a reason for hiding this comment

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

Could this be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, removed

Comment on lines +110 to +111
List<GermplasmImportPending> mappedBrAPIImport = germplasmImports.stream()
.map(germplasmImport -> new GermplasmImportPending()).collect(Collectors.toList());
Copy link
Member

Choose a reason for hiding this comment

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

Why do you create all of these objects ahead of time? Couldn't you create them during processing below and add them to this list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, moved into the main data set loop.

germplasmSearch.germplasmNames(germplasmNames);
// Germplasm doesn't have program attached. Do species as next best thing
germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName()));
//germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName()));
Copy link
Member

Choose a reason for hiding this comment

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

What's going on with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it, breedbase didn't like it.

BrAPIGermplasm germplasm = constructBrAPIGermplasm();
germplasm.setSpecies(species);
germplasm.setCommonCropName(species);
//germplasm.setSpecies(species);
Copy link
Member

Choose a reason for hiding this comment

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

why is this commented out vs being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it

description = "This import is used to create a pedigree history by importing germplasm.")
public class PedigreeImport implements BrAPIImport {
@ImportConfigMetadata(id="GermplasmImport", name="Germplasm Import",
description = "This import is used to create germplasm and create a pedigree by specify parental connections.")
Copy link
Member

Choose a reason for hiding this comment

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

specifying

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

}

public BrAPIGermplasm constructBrAPIGermplasm(String species) {
public BrAPIGermplasm constructBrAPIGermplasm(BrAPIProgram brAPIProgram) {
Copy link
Member

Choose a reason for hiding this comment

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

Not here but in the constructBrAPIGermplasm without parameters, getting an error for germplasm.setAccessionNumber(getAccessionNumber()); and also duplicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Spoke with Nick, the error is his IntelliJ environment because github actions builds it fine. I removed the duplicate.

// statistics
// Germplasm
// new
// ObservationUnits
Copy link
Member

Choose a reason for hiding this comment

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

should this be pedigree?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this comment, it was just to help me work through the class structure.

@ctucker3 ctucker3 merged commit 619a3cc into develop May 13, 2021
@ctucker3 ctucker3 deleted the bug/BI-873 branch May 13, 2021 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants