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

Added comments to 5 classes in the service folder #11310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
97 changes: 88 additions & 9 deletions src/main/java/org/cbioportal/service/CopyNumberSegmentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,96 @@

public interface CopyNumberSegmentService {

List<CopyNumberSeg> getCopyNumberSegmentsInSampleInStudy(String studyId, String sampleId, String chromosome, String projection,
Integer pageSize, Integer pageNumber, String sortBy,
String direction)
throws SampleNotFoundException, StudyNotFoundException;
/**
* Retrieves sorted list of copy number segments for a specific sample
* within a specific study. This method allows filtering by chromosome and projection.
*
* @param studyId the ID of the study
* @param sampleId the ID of the sample
* @param chromosome the chromosome to filter by
* @param projection the projection type
* @param pageSize the number of records per page
* @param pageNumber the page number to retrieve
* @param sortBy the field to sort the results by
* @param direction the sort direction (e.g., ASC or DESC)
* @return a list of copy number segments
* @throws SampleNotFoundException if the sample is not found
* @throws StudyNotFoundException if the study is not found
*/
List<CopyNumberSeg> getCopyNumberSegmentsInSampleInStudy(
String studyId,
String sampleId,
String chromosome,
String projection,
Integer pageSize,
Integer pageNumber,
String sortBy,
String direction
) throws SampleNotFoundException, StudyNotFoundException;

BaseMeta getMetaCopyNumberSegmentsInSampleInStudy(String studyId, String sampleId, String chromosome)
throws SampleNotFoundException, StudyNotFoundException;
/**
* Retrieves metadata for copy number segments for a specific sample
* within a specific study, filtered by chromosome.
*
* @param studyId the ID of the study
* @param sampleId the ID of the sample
* @param chromosome the chromosome to filter by
* @return the metadata for the copy number segments
* @throws SampleNotFoundException if the sample is not found
* @throws StudyNotFoundException if the study is not found
*/
BaseMeta getMetaCopyNumberSegmentsInSampleInStudy(
String studyId,
String sampleId,
String chromosome
) throws SampleNotFoundException, StudyNotFoundException;

List<CopyNumberSeg> fetchCopyNumberSegments(List<String> studyIds, List<String> sampleIds, String chromosome, String projection);
/**
* Fetches copy number segments for multiple studies and samples,
* filtered by chromosome and projection.
*
* @param studyIds a list of study IDs
* @param sampleIds a list of sample IDs
* @param chromosome the chromosome to filter by
* @param projection the projection type
* @return a list of copy number segments
*/
List<CopyNumberSeg> fetchCopyNumberSegments(
List<String> studyIds,
List<String> sampleIds,
String chromosome,
String projection
);

BaseMeta fetchMetaCopyNumberSegments(List<String> studyIds, List<String> sampleIds, String chromosome);
/**
* Fetches metadata for copy number segments for multiple studies and samples,
* filtered by chromosome.
*
* @param studyIds a list of study IDs
* @param sampleIds a list of sample IDs
* @param chromosome the chromosome to filter by
* @return the metadata for the copy number segments
*/
BaseMeta fetchMetaCopyNumberSegments(
List<String> studyIds,
List<String> sampleIds,
String chromosome
);

List<CopyNumberSeg> getCopyNumberSegmentsBySampleListId(String studyId, String sampleListId, String chromosome, String projection);
/**
* Retrieves copy number segments for a list of samples within a study,
* filtered by chromosome and projection.
*
* @param studyId the ID of the study
* @param sampleListId the ID of the sample list
* @param chromosome the chromosome to filter by
* @param projection the projection type
* @return a list of copy number segments
*/
List<CopyNumberSeg> getCopyNumberSegmentsBySampleListId(
String studyId,
String sampleListId,
String chromosome,
String projection
);
}
187 changes: 144 additions & 43 deletions src/main/java/org/cbioportal/service/DiscreteCopyNumberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,147 @@

public interface DiscreteCopyNumberService {

List<DiscreteCopyNumberData> getDiscreteCopyNumbersInMolecularProfileBySampleListId(String molecularProfileId,
String sampleListId,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes,
String projection)
throws MolecularProfileNotFoundException;

BaseMeta getMetaDiscreteCopyNumbersInMolecularProfileBySampleListId(String molecularProfileId, String sampleListId,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes)
throws MolecularProfileNotFoundException;

List<DiscreteCopyNumberData> fetchDiscreteCopyNumbersInMolecularProfile(String molecularProfileId,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes,
String projection)
throws MolecularProfileNotFoundException;

List<DiscreteCopyNumberData> getDiscreteCopyNumbersInMultipleMolecularProfiles(List<String> molecularProfileIds,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes,
String projection);

List<DiscreteCopyNumberData> getDiscreteCopyNumbersInMultipleMolecularProfilesByGeneQueries(List<String> molecularProfileIds,
List<String> sampleIds,
List<GeneFilterQuery> geneQueries,
String projection);

BaseMeta fetchMetaDiscreteCopyNumbersInMolecularProfile(String molecularProfileId, List<String> sampleIds,
List<Integer> entrezGeneIds, List<Integer> alterationTypes)
throws MolecularProfileNotFoundException;

List<CopyNumberCountByGene> getSampleCountByGeneAndAlterationAndSampleIds(String molecularProfileId,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterations)
throws MolecularProfileNotFoundException;

List<CopyNumberCount> fetchCopyNumberCounts(String molecularProfileId, List<Integer> entrezGeneIds,
List<Integer> alterations) throws MolecularProfileNotFoundException;
}
/**
* Retrieves discrete copy number data for a specific molecular profile based on a sample list ID.
* Allows filtering by gene IDs, alteration types, and projection type.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleListId the ID of the sample list
* @param entrezGeneIds a list of Entrez gene IDs to filter by
* @param alterationTypes a list of alteration types to filter by
* @param projection the projection type
* @return a list of discrete copy number data
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
List<DiscreteCopyNumberData> getDiscreteCopyNumbersInMolecularProfileBySampleListId(
String molecularProfileId,
String sampleListId,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes,
String projection
) throws MolecularProfileNotFoundException;

/**
* Retrieves metadata for discrete copy number data in a specific molecular profile
* using a sample list ID and filters by gene IDs and alteration types.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleListId the ID of the sample list
* @param entrezGeneIds a list of Entrez gene IDs to filter by
* @param alterationTypes a list of alteration types to filter by
* @return metadata for the discrete copy number data
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
BaseMeta getMetaDiscreteCopyNumbersInMolecularProfileBySampleListId(
String molecularProfileId,
String sampleListId,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes
) throws MolecularProfileNotFoundException;

/**
* Fetches discrete copy number data for a specific molecular profile based on sample IDs.
* Filters by gene IDs, alteration types, and projection type.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleIds a list of sample IDs
* @param entrezGeneIds a list of Entrez gene IDs to filter by
* @param alterationTypes a list of alteration types to filter by
* @param projection the projection type
* @return a list of discrete copy number data
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
List<DiscreteCopyNumberData> fetchDiscreteCopyNumbersInMolecularProfile(
String molecularProfileId,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes,
String projection
) throws MolecularProfileNotFoundException;

/**
* Retrieves discrete copy number data for multiple molecular profiles based on sample IDs.
* Filters by gene IDs, alteration types, and projection type.
*
* @param molecularProfileIds a list of molecular profile IDs
* @param sampleIds a list of sample IDs
* @param entrezGeneIds a list of Entrez gene IDs to filter by
* @param alterationTypes a list of alteration types to filter by
* @param projection the projection type
* @return a list of discrete copy number data
*/
List<DiscreteCopyNumberData> getDiscreteCopyNumbersInMultipleMolecularProfiles(
List<String> molecularProfileIds,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes,
String projection
);

/**
* Retrieves discrete copy number data for multiple molecular profiles using gene queries.
*
* @param molecularProfileIds a list of molecular profile IDs
* @param sampleIds a list of sample IDs
* @param geneQueries a list of gene filter queries
* @param projection the projection type
* @return a list of discrete copy number data
*/
List<DiscreteCopyNumberData> getDiscreteCopyNumbersInMultipleMolecularProfilesByGeneQueries(
List<String> molecularProfileIds,
List<String> sampleIds,
List<GeneFilterQuery> geneQueries,
String projection
);

/**
* Fetches metadata for discrete copy number data in a specific molecular profile based on sample IDs.
* Filters by gene IDs and alteration types.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleIds a list of sample IDs
* @param entrezGeneIds a list of Entrez gene IDs to filter by
* @param alterationTypes a list of alteration types to filter by
* @return metadata for the discrete copy number data
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
BaseMeta fetchMetaDiscreteCopyNumbersInMolecularProfile(
String molecularProfileId,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterationTypes
) throws MolecularProfileNotFoundException;

/**
* Retrieves sample counts grouped by gene and alteration type for specific sample IDs
* in a molecular profile.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleIds a list of sample IDs
* @param entrezGeneIds a list of Entrez gene IDs
* @param alterations a list of alteration types
* @return a list of copy number counts by gene
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
List<CopyNumberCountByGene> getSampleCountByGeneAndAlterationAndSampleIds(
String molecularProfileId,
List<String> sampleIds,
List<Integer> entrezGeneIds,
List<Integer> alterations
) throws MolecularProfileNotFoundException;

/**
* Fetches copy number counts grouped by gene and alteration type for a specific molecular profile.
*
* @param molecularProfileId the ID of the molecular profile
* @param entrezGeneIds a list of Entrez gene IDs
* @param alterations a list of alteration types
* @return a list of copy number counts
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
List<CopyNumberCount> fetchCopyNumberCounts(
String molecularProfileId,
List<Integer> entrezGeneIds,
List<Integer> alterations
) throws MolecularProfileNotFoundException;
}
77 changes: 66 additions & 11 deletions src/main/java/org/cbioportal/service/GenericAssayService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,73 @@
import org.cbioportal.service.exception.MolecularProfileNotFoundException;

public interface GenericAssayService {

List<GenericAssayMeta> getGenericAssayMetaByStableIdsAndMolecularIds(List<String> stableIds, List<String> molecularProfileIds, String projection);

List<GenericAssayData> getGenericAssayData(String molecularProfileId, String sampleListId,
List<String> genericAssayStableIds, String projection)
throws MolecularProfileNotFoundException;
/**
* Retrieves metadata for generic assay data based on a list of stable IDs and molecular profile IDs.
* Allows filtering by projection type.
*
* @param stableIds a list of stable IDs for the generic assays
* @param molecularProfileIds a list of molecular profile IDs
* @param projection the projection type
* @return a list of generic assay metadata
*/
List<GenericAssayMeta> getGenericAssayMetaByStableIdsAndMolecularIds(
List<String> stableIds,
List<String> molecularProfileIds,
String projection
);

List<GenericAssayData> fetchGenericAssayData(String molecularProfileId, List<String> sampleIds,
List<String> genericAssayStableIds, String projection)
throws MolecularProfileNotFoundException;
/**
* Retrieves generic assay data for a specific molecular profile and sample list.
* Filters by a list of stable IDs and allows specifying a projection type.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleListId the ID of the sample list
* @param genericAssayStableIds a list of stable IDs for the generic assays
* @param projection the projection type
* @return a list of generic assay data
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
List<GenericAssayData> getGenericAssayData(
String molecularProfileId,
String sampleListId,
List<String> genericAssayStableIds,
String projection
) throws MolecularProfileNotFoundException;

List<GenericAssayData> fetchGenericAssayData(List<String> molecularProfileIds, List<String> sampleIds,
List<String> genericAssayStableIds, String projection)
throws MolecularProfileNotFoundException;
/**
* Fetches generic assay data for a specific molecular profile and a list of sample IDs.
* Filters by a list of stable IDs and allows specifying a projection type.
*
* @param molecularProfileId the ID of the molecular profile
* @param sampleIds a list of sample IDs
* @param genericAssayStableIds a list of stable IDs for the generic assays
* @param projection the projection type
* @return a list of generic assay data
* @throws MolecularProfileNotFoundException if the molecular profile is not found
*/
List<GenericAssayData> fetchGenericAssayData(
String molecularProfileId,
List<String> sampleIds,
List<String> genericAssayStableIds,
String projection
) throws MolecularProfileNotFoundException;

/**
* Fetches generic assay data for multiple molecular profiles and sample IDs.
* Filters by a list of stable IDs and allows specifying a projection type.
*
* @param molecularProfileIds a list of molecular profile IDs
* @param sampleIds a list of sample IDs
* @param genericAssayStableIds a list of stable IDs for the generic assays
* @param projection the projection type
* @return a list of generic assay data
* @throws MolecularProfileNotFoundException if any of the molecular profiles are not found
*/
List<GenericAssayData> fetchGenericAssayData(
List<String> molecularProfileIds,
List<String> sampleIds,
List<String> genericAssayStableIds,
String projection
) throws MolecularProfileNotFoundException;
}
Loading