Skip to content

Fixed chromosome comparison in createNormalizedCoverageFiles()#40

Open
ryim wants to merge 3 commits intomolgenis:masterfrom
ryim:master
Open

Fixed chromosome comparison in createNormalizedCoverageFiles()#40
ryim wants to merge 3 commits intomolgenis:masterfrom
ryim:master

Conversation

@ryim
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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