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

Argument parsing corrections #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shershebnev
Copy link

@Shershebnev Shershebnev commented Jan 27, 2017

  1. Several arguments were incorrectly converted to integer instead of float
    which rounded them. Arguments (like minhetfreq) that were in range (0, 1) were
    rounded to 0 and hence always assigned default values during later checks
    (BS-SNPer.pl:48-55 @ master)
  2. It wasn't possible to set any argument to 0 as in this case in later checks
    (BS-SNPer.pl:48-55 @ master) 0 was interpreted as False and the default value
    was used in such cases.
  3. It doesn't make sense to check @argv == 0 at line 47 as it will be empty
    after GetOptions. What makes sense is checking for files, as there are no
    default values for them. Although for output files it might be good idea
    to just construct them based on input filename by adding predefined suffixes,
    i.e. if $bam == file.bam, $methcg would be file.bam.methcg

1. Several arguments were incorrectly converted to integer instead of float
which rounded them. Arguments (like minhetfreq) that were in range (0, 1) were
rounded to 0 and hence always assigned default values during later checks
(BS-SNPer.pl:48-55 @ master)
2. It wasn't possible to set any argument to 0 as in this case in later checks
(BS-SNPer.pl:48-55 @ master) 0 was interpreted as False and the default value
was used in such cases.
3. It doesn't make sense to check @argv == 0 here as it will be empty
after GetOptions. What makes sense is checking for files, as there are no
default values for them. Although for output files it might be good idea
to just construct them based on input filename by adding predefined suffixes,
i.e. if $bam == file.bam, $methcg would be file.bam.methcg
galaxy001 added a commit to BGI-SZ/BS-Snper that referenced this pull request Jan 5, 2021
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.

1 participant