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

edit feature table scripts #17

Merged
merged 5 commits into from
Dec 21, 2023
Merged

edit feature table scripts #17

merged 5 commits into from
Dec 21, 2023

Conversation

mayasheth
Copy link
Contributor

Edit feature table generation scripts to be compatible with new feature config format

@mayasheth mayasheth requested a review from atancoder December 20, 2023 20:04
@@ -40,11 +40,11 @@ BIOSAMPLE_ACTIVITES = {
biosample: activity for _, (biosample, activity) in
BIOSAMPLE_DF[["biosample", "default_accessibility_feature"]].iterrows()
}
ABC_dirs = {biosample: os.path.join(RESULTS_DIR, biosample) for biosample in BIOSAMPLE_DF.biosamples}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't call this ABC_dirs since it stores e2g stuff as well. Probably BIOSAMPLE_DIRS is more fitting

Is the reason for this to shorten the code when doing os.path.joins? If it's just that, not sure if it's better since now you have to add the lambda fn when invoking it. Also it would be good to be consistent with the style instead of having some rules use ABC_dirs and others still have the old way

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 created this directory specifically to refer to the place where the directory where the EnhancersAllPutative and EnhancerList files live to make it compatible with running from an existing ABC directory if we want to implement that in the "apply" workflow in the future (this is something I did in the training workflow). In that case, the new features (SumCandidateEnhancers, etc.) will be created in a different location. I added the variable to this workflow to avoid having to copy the gen_new_features rule with different input paths for the two workflows. So it's only meant to be used when referred when using those specific two files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense, ty!

Can we rename to ABC_BIOSAMPLES_DIR to be more precise? (We also want to uppercase global variables).

And add a comment explaining the reason for this variable, e.g how training workflow works based on existing ABC directories?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

workflow/rules/activity_only_features.smk Outdated Show resolved Hide resolved
workflow/rules/activity_only_features.smk Outdated Show resolved Hide resolved
workflow/rules/activity_only_features.smk Outdated Show resolved Hide resolved
mayasheth and others added 3 commits December 20, 2023 12:50
Co-authored-by: Anthony Tan <10254642+atancoder@users.noreply.github.com>
…_rE2G into modify_apply_workflow

align with commits from PR
@@ -40,11 +40,11 @@ BIOSAMPLE_ACTIVITES = {
biosample: activity for _, (biosample, activity) in
BIOSAMPLE_DF[["biosample", "default_accessibility_feature"]].iterrows()
}
ABC_dirs = {biosample: os.path.join(RESULTS_DIR, biosample) for biosample in BIOSAMPLE_DF.biosamples}
Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense, ty!

Can we rename to ABC_BIOSAMPLES_DIR to be more precise? (We also want to uppercase global variables).

And add a comment explaining the reason for this variable, e.g how training workflow works based on existing ABC directories?

@mayasheth mayasheth merged commit 49d57c3 into main Dec 21, 2023
@mayasheth mayasheth deleted the modify_apply_workflow branch December 21, 2023 20:17
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.

2 participants