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

Reduce complexity in CytoSnake scripts #41

Open
1 of 4 tasks
axiomcura opened this issue Apr 10, 2023 · 1 comment
Open
1 of 4 tasks

Reduce complexity in CytoSnake scripts #41

axiomcura opened this issue Apr 10, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@axiomcura
Copy link
Member

axiomcura commented Apr 10, 2023

Mentioned in #37 in this comment

The script design is unnecessarily complex, since we are only using a single function call; therefore it should be encapsulated into a single main() function to reduce complexity instead of two.

Example:

import cytotable

def function1(param1, param2, param3):
   # enter code here 
   cytotable.convert(param1, param2, param3)
   return 0


def main ():
   p1 = snakemake.param[0]
   p2 = snakemake.param[1]
   p3 = snakemake.param[2]

   function1(p1, p2, p3)

if __main__ == "__name__"
   main()

can be reduced to:

def main ():
   p1 = snakemake.param[0]
   p2 = snakemake.param[1]
   p3 = snakemake.param[2]

   function1(p1, p2, p3)

if __main__ == "__name__"
   main()

Todo list

@axiomcura axiomcura self-assigned this Apr 10, 2023
@axiomcura axiomcura added the enhancement New feature or request label Apr 10, 2023
@axiomcura
Copy link
Member Author

small update regarded about this issue:

turns out that sectioning parameters is not ideal for instances where there are two functions used from the same parameter. Therefore the best approach is the load in the whole configuration instead of sectioning it.

First we the scripts have to be designed in order for it to be simple enough to allow whole config integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant