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

Fixed chromosome comparison in createNormalizedCoverageFiles() #40

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ryim
Copy link

@ryim ryim commented Mar 4, 2019

Chromosomes in BED and BAM files start with "chr". createNormalizedCoverageFiles() was trying to compare chromosome names in samples and control files as if these names were numerics. The subroutine now treats both as strings for comparison.

Richard Yim added 2 commits March 4, 2019 17:10
Chromosomes in BED and BAM files start with "chr". createNormalizedCoverageFiles() was trying to compare chromosome names in samples and control files as if these names were numerics. The subroutine now treats both as strings for comparison.
Fixed chromosome comparison in createNormalizedCoverageFiles()
@freerkvandijk
Copy link
Member

Dear Richard,
Thanks for this fix. We'll accept the fix, after validation with testdata, in the next version update.

Cheers,
Freerk

@ryim
Copy link
Author

ryim commented Mar 11, 2019

Hi Freerk,
No problem!

If this is in active development, you may want to remove lines 2025-2028 in CoNVaDING.pl v1.2.1. Now that the chromosome name is processed in string context, there is no need to replace the non-numerical identifiers with numbers. I was planning on doing this, but did not want to Commit and submit a Pull-Request until I had time to make sure that this change worked.

Best wishes,
Ric

@Fred-07
Copy link

Fred-07 commented Mar 20, 2020

Other option is to convert number to string by interpolation and use "eq"
LINE 2107:
if ("$chrSample" eq "$chrControl" ......

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