Merged
Conversation
Reviewer's GuideThis PR enhances DataProcessor by adding a real-time progress bar for peptide-to-protein alignment, centralizing key imports at the module level, refining the isoform splitting regex, and simplifying the ImmunoViz object creation signature. Sequence diagram for peptide-to-protein alignment with progress barsequenceDiagram
participant DataProcessor
participant ProgressBar as Progress
participant DataFrame as data
participant ProteinDB as get_protein_sequence
participant Output as formatted_rows
DataProcessor->>ProgressBar: Start progress bar (total = len(data))
loop For each row in data
DataProcessor->>DataFrame: Get peptide, accession, intensities
DataProcessor->>DataProcessor: extract_protein_ids
alt protein_ids found
loop For each protein_id
DataProcessor->>ProteinDB: get_protein_sequence(protein_id)
alt sequence found
DataProcessor->>DataProcessor: find_peptide_position
else sequence not found
DataProcessor->>DataProcessor: Use placeholder positions
end
DataProcessor->>Output: Append formatted row if intensity > threshold
end
end
DataProcessor->>ProgressBar: Update progress
end
ProgressBar-->>DataProcessor: Complete
Class diagram for updated PeptideDataProcessor structureclassDiagram
class PeptideDataProcessor {
+extract_protein_ids(accession_value: str, protein_pattern=None) List[str]
+extract_protein_isoforms(accession_value: str, protein_pattern: str = r'[,:;|/\s]+') List[str]
+filter_and_format_data(...)
+get_protein_sequence(protein_id: str) Optional[str]
+create_immunoviz_object() ImmunoViz
-intensity_cols
-sample_prefix
-peptide_df
}
class ImmunoViz
PeptideDataProcessor --> ImmunoViz : creates
Class diagram for ImmunoViz import and type annotation updateclassDiagram
class PeptideDataProcessor {
+create_immunoviz_object() ImmunoViz
}
class ImmunoViz
PeptideDataProcessor --> ImmunoViz : returns
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
We encountered an error and are unable to review this PR. We have been notified and are working to fix it.
You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Integrate a real-time progress bar into peptide filtering, refine isoform extraction regex, and streamline ImmunoViz integration.
Enhancements: