Skip to content

Added mean field protocol for complexes#223

Open
kpgbrock wants to merge 1 commit into
debbiemarkslab:developfrom
kpgbrock:complex_dev
Open

Added mean field protocol for complexes#223
kpgbrock wants to merge 1 commit into
debbiemarkslab:developfrom
kpgbrock:complex_dev

Conversation

@kpgbrock

Copy link
Copy Markdown
Contributor

Based directly off of the PLM code, but used MeanField model and fit. Note: for region_start when mapping segments, I used the number in kwargs instead of the one taken from the MeanField model - the latter led to incorrect numbering.

@kpgbrock kpgbrock requested a review from aggreen July 22, 2019 18:52
@thomashopf

Copy link
Copy Markdown
Contributor

Great, thanks Kelly!

I think it makes sense to consider some refactoring at this point to avoid code duplication - just like the PLM-based protocols have infer_plm(), the mean-field based protocols could have infer_meanfield() that contains most of the non-specific code shared between monomers and complexes etc.

@kpgbrock

Copy link
Copy Markdown
Contributor Author

@thomashopf agree wholeheartedly - will better modularize after current research push :)

@aggreen aggreen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good- there's only minor documentation and whitespace changes that need to be made. I've been using this protocol successfully with no issues.

[
"prefix", "min_sequence_distance",
"scoring_model", "use_all_ecs_for_scoring",
"alignment_file","segments","focus_mode",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

put spaces after commas in list

"prefix", "min_sequence_distance",
"scoring_model", "use_all_ecs_for_scoring",
"alignment_file","segments","focus_mode",
"focus_sequence","theta","pseudo_count",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spaces


prefix = kwargs["prefix"]

# infer ECs and load them with plmc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete these obsolete lines


#infer ECs with mean field/DCA

# Below here is added material from mean_field protocol:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete commented line

#infer ECs with mean field/DCA

# Below here is added material from mean_field protocol:
model = prefix+".model"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

prefix + ".model"

)



Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

limit to one whitespace line

if segments is not None:
# create index mapping
seg_mapper = mapping.SegmentIndexMapper(
# kwargs["focus_mode"], outcfg["region_start"], *segments

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete commented line

ecs = mapping.segment_map_ecs(ecs,seg_mapper)



Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

limit to one whitespace line

# file_format="plmc_v2"
# )

###### End added material

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete commented lines

@aggreen

aggreen commented Apr 28, 2020

Copy link
Copy Markdown
Contributor

This branch is included in #225 - ok to close this pull request?

@thomashopf

Copy link
Copy Markdown
Contributor

Does this already have the suggested refactoring to reduce code redundancy?

@aggreen

aggreen commented Apr 28, 2020

Copy link
Copy Markdown
Contributor

No, there's been no refactoring that I know of

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.

3 participants