Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rope bwt chr index #282

Merged
merged 11 commits into from
Feb 20, 2025
Merged

Rope bwt chr index #282

merged 11 commits into from
Feb 20, 2025

Conversation

zrm22
Copy link
Collaborator

@zrm22 zrm22 commented Feb 19, 2025

Description

Full Chromosome BWT3 indexing

Type of change

What type of changes does your code introduce? Put an x in boxes that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated relevant documentation

Changelog entry

Please add a one-line changelog entry below. This will be copied to the changelog file during the release process.

Adding in ropebwt3 full chromosome indexing.

@zrm22 zrm22 self-assigned this Feb 19, 2025
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 83.46457% with 21 lines in your changes missing coverage. Please review.

Project coverage is 80.63%. Comparing base (5024f4c) to head (d4d4f57).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
...aizegenetics/phgv2/pathing/ropebwt/RopeBWTUtils.kt 69.09% 16 Missing and 1 partial ⚠️
...egenetics/phgv2/pathing/ropebwt/RopeBwtChrIndex.kt 95.52% 2 Missing and 1 partial ⚠️
src/main/kotlin/net/maizegenetics/phgv2/cli/Phg.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   80.46%   80.63%   +0.17%     
==========================================
  Files         101      102       +1     
  Lines        7514     7592      +78     
  Branches     1230     1233       +3     
==========================================
+ Hits         6046     6122      +76     
- Misses        992      995       +3     
+ Partials      476      475       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

else {
Pair("-n", "phgv2-ropebwt-conda")
}
//time ../ropebwt3/ropebwt3 build -t24 -i phg_ASMs_input.fmr -bo phg_ASMs.fmr /workdir/zrm22/phgv2/ropeBWT/fullASMTests/ASMs/A188
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if you want your file paths in here

*/
fun runBuildStep(inputFasta:String, indexFilePrefix:String, numThreads: Int, condaEnvPrefix:String) {
//"conda","run","-p","phgv2-conda"
val prefixArg = if(condaEnvPrefix.isNotBlank()) {
Copy link
Member

Choose a reason for hiding this comment

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

Could this be refactored? It looks like you are repeating this if/else block several times throughout the file.

Copy link
Member

@btmonier btmonier Feb 19, 2025

Choose a reason for hiding this comment

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

For example:

// example helper function
fun getPrefixArg(condaEnvPrefix: String): Pair<String, String> {
    if (condaEnvPrefix.isNotBlank()) {
        Pair("-p", condaEnvPrefix)
    } else { 
        Pair("-n", "phgv2-ropebwt-conda")
    }
}

// deploy into other functions
val prefixArg = getPrefixArg(condaEnvPrefix)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep makes sense, I updated.

val condaEnvPrefix by option (help = "Prefix for the conda environment to use. If provided, this should be the full path to the conda environment.")
.default("")

override fun run() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you want to call the parameter logging?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes I thought I had put that in there but missed it. It's in there now.

@zrm22 zrm22 merged commit 0ae1b5b into main Feb 20, 2025
4 checks passed
@zrm22 zrm22 deleted the rope-bwt-chr-index branch February 20, 2025 19:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants