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

feat: add tinit #215

Open
wants to merge 307 commits into
base: main
Choose a base branch
from
Open

feat: add tinit #215

wants to merge 307 commits into from

Conversation

JoshLoecker
Copy link
Member

@JoshLoecker JoshLoecker commented Jan 31, 2025

Description

This pull request will add the t-INIT method from Troppo to the model-building options

⚠️⚠️⚠️ BREAKING CHANGES ⚠️⚠️⚠️

  1. The function create_context_specific_model no longer accepts output_model_filetypes
  2. The function create_context_specific_model parameter output_model_filepaths should be a list of paths ending in .json, .mat, .xml, or .sbml, depending on the requested output type.

This is functionally equivalent to the _read_counts_matrix function from rnaseq.py
Instead of checking if the stem of directories match, check that the same number of files are returned. Because the directories are sorted (and this comes from FastqToGeneCounts), they should always match
Removes an extra indentation
# Conflicts:
#	main/como/rnaseq.py
# Conflicts:
#	pyproject.toml
JoshLoecker and others added 28 commits January 12, 2025 16:49
Signed-off-by: Josh Loecker <[email protected]>
Signed-off-by: Josh Loecker <[email protected]>
Signed-off-by: Josh Loecker <[email protected]>
Signed-off-by: Josh Loecker <[email protected]>
@Copilot Copilot bot review requested due to automatic review settings January 31, 2025 19:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 13 out of 28 changed files in this pull request and generated 3 comments.

Files not reviewed (15)
  • main/como/custom_types.py: Evaluated as low risk
  • tests/test_rnaseq_preprocess.py: Evaluated as low risk
  • main/como/proteomics_gen.py: Evaluated as low risk
  • main/como/proteomics_preprocessing.py: Evaluated as low risk
  • ruff.toml: Evaluated as low risk
  • pyproject.toml: Evaluated as low risk
  • main/como/utils.py: Evaluated as low risk
  • main/como/graph/init.py: Evaluated as low risk
  • main/como/proteomics/FTPManager.py: Evaluated as low risk
  • main/como/proteomics/proteomics_preprocess.py: Evaluated as low risk
  • main/como/cluster_rnaseq.py: Evaluated as low risk
  • tests/test_proteomics.py: Evaluated as low risk
  • .github/workflows/continuous_integration.yml: Evaluated as low risk
  • main/como/init.py: Evaluated as low risk
  • .pre-commit-config.yaml: Evaluated as low risk
Comments suppressed due to low confidence (6)

tests/unit/test_rnaseq_preprocess.py:70

  • The test should validate the content of the DataFrame, not just the column names.
result: pd.DataFrame = await _process_first_multirun_sample(strand_filepath, all_gene_count_filepaths)

main/como/data_types.py:147

  • [nitpick] The method get_shorthand in the class CobraCompartments is inconsistent with the naming convention used in the rest of the codebase. It should be renamed to get to match the existing method names.
def get_shorthand(cls, longhand: str) -> str | None:

main/como/data_types.py:152

  • [nitpick] The method get_longhand in the class CobraCompartments is inconsistent with the naming convention used in the rest of the codebase. It should be renamed to get_long to match the existing method names.
def get_longhand(cls, shorthand: str) -> str | None:

main/como/data_types.py:82

  • The SourceTypes enum has a member PROTEOMICS, but there is no corresponding logic or implementation for this source type in the codebase.
PROTEOMICS = "proteomics"

main/como/data_types.py:216

  • The _validate_attribute method in the class _BaseDataType should use the _log_and_raise_error function for consistency.
def _validate_attribute(self, key):

tests/fixtures/collect_files.py:7

  • [nitpick] The variable name _fragment_size_filepaths is ambiguous. It should be renamed to fragment_size_filepaths.
_fragment_size_filepaths = list(Path("main/data/COMO_input").absolute().rglob("*fragment_size*.txt"))



def test_source_types():
"""Validate that source types always go in the order of 'trna', 'mrna', 'scrna', 'protemics'."""
Copy link
Preview

Copilot AI Jan 31, 2025

Choose a reason for hiding this comment

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

The word 'protemics' should be corrected to 'proteomics'.

Suggested change
"""Validate that source types always go in the order of 'trna', 'mrna', 'scrna', 'protemics'."""
"""Validate that source types always go in the order of 'trna', 'mrna', 'scrna', 'proteomics'."""

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@pytest.mark.asyncio
async def test_build_from_tab_invalid_file(self):
"""Validate error on invalid file."""
with pytest.raises(ValueError, match="Building STAR information requires a '.tab' file"):
Copy link
Preview

Copilot AI Jan 31, 2025

Choose a reason for hiding this comment

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

The word 'requires' should be 'require'.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
GIMME = "GIMME"
FASTCORE = "FASTCORE"
IMAT = "IMAT"
TINIT = "TINIT"
Copy link
Preview

Copilot AI Jan 31, 2025

Choose a reason for hiding this comment

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

The enum Algorithm has a new member TINIT, but there is no corresponding logic or implementation for this algorithm in the codebase.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant