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

Failure in creating .hic file by pre command: java.lang.NumberFormatException: For input string: "chr1" #238

Closed
yuanyuanhe2021 opened this issue Aug 28, 2021 · 2 comments
Labels

Comments

@yuanyuanhe2021
Copy link

Hi, I was trying to create a .hic file from my sorted file 48072_allValidPairs.pre_juicebox_sorted by the following command:
java -jar ../apps/juicer_tools_1.11.04_jcuda.0.8.jar pre tmp/48072_allValidPairs.pre_juicebox_sorted ./test_by_juicepre.hic hg19

but it give me the error:
WARN [2021-08-28T15:23:31,190] [Globals.java:138] [main] Development mode is enabled
Not including fragment map
Start preprocess
Writing header
Writing body
java.lang.NumberFormatException: For input string: "chr1"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at juicebox.tools.utils.original.AsciiPairIterator.advance(AsciiPairIterator.java:216)
at juicebox.tools.utils.original.AsciiPairIterator.next(AsciiPairIterator.java:271)
at juicebox.tools.utils.original.Preprocessor.computeWholeGenomeMatrix(Preprocessor.java:555)
at juicebox.tools.utils.original.Preprocessor.writeBody(Preprocessor.java:653)
at juicebox.tools.utils.original.Preprocessor.preprocess(Preprocessor.java:413)
at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:122)
at juicebox.tools.HiCTools.main(HiCTools.java:96)

My input file is organized in th format
and the first several lines are like this:
HWI-D00645:88:C7HBDANXX:6:1111:2926:93160 0 chr1 13364 0 1 chr1 12636433 1
HWI-D00645:88:C7HBDANXX:6:2103:11886:76007 1 chr1 13465 0 0 chr1 1386430 1
HWI-D00645:88:C7HBDANXX:6:2215:2638:47725 0 chr1 13864 0 1 chr1 11330574 1
HWI-D00645:88:C7HBDANXX:6:2106:14571:65098 1 chr1 13877 0 1 chr11 293293 1
HWI-D00645:88:C7HBDANXX:6:2211:3904:49818 1 chr1 13052 0 1 chr11 627695 1
HWI-D00645:88:C7HBDANXX:6:1102:17272:98283 1 chr1 13039 0 0 chr12 1405896 1
HWI-D00645:88:C7HBDANXX:6:1103:16267:71707 0 chr1 13469 0 0 chr12 207718 1
HWI-D00645:88:C7HBDANXX:6:1313:15280:85241 1 chr1 13503 0 1 chr12 283318 1

I thought it might be the problem of the chromosome name in my inputfile is wrote in strings like "chr1" "chr2" but not in numeric format like "1" "2". But others who put their cases online can run it well with chromosome named as "chr1""chr2".

Could you please tell me how to solve it?
Thank you very much!

@nchernia
Copy link
Collaborator

nchernia commented Aug 28, 2021 via email

@yuanyuanhe2021
Copy link
Author

It doesn’t look like your file is in one of these formats: https://github.com/aidenlab/juicer/wiki/Pre#file-format
On Sat, Aug 28, 2021 at 9:50 AM yuanyuanhe2021 @.***> wrote: Hi, I was trying to create a .hic file from my sorted file 48072_allValidPairs.pre_juicebox_sorted by the following command: java -jar ../apps/juicer_tools_1.11.04_jcuda.0.8.jar pre tmp/48072_allValidPairs.pre_juicebox_sorted ./test_by_juicepre.hic hg19 but it give me the error: WARN [2021-08-28T15:23:31,190] [Globals.java:138] [main] Development mode is enabled Not including fragment map Start preprocess Writing header Writing body java.lang.NumberFormatException: For input string: "chr1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.parseInt(Integer.java:615) at juicebox.tools.utils.original.AsciiPairIterator.advance(AsciiPairIterator.java:216) at juicebox.tools.utils.original.AsciiPairIterator.next(AsciiPairIterator.java:271) at juicebox.tools.utils.original.Preprocessor.computeWholeGenomeMatrix(Preprocessor.java:555) at juicebox.tools.utils.original.Preprocessor.writeBody(Preprocessor.java:653) at juicebox.tools.utils.original.Preprocessor.preprocess(Preprocessor.java:413) at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:122) at juicebox.tools.HiCTools.main(HiCTools.java:96) My input file is organized in th format and the first several lines are like this: HWI-D00645:88:C7HBDANXX:6:1111:2926:93160 0 chr1 13364 0 1 chr1 12636433 1 HWI-D00645:88:C7HBDANXX:6:2103:11886:76007 1 chr1 13465 0 0 chr1 1386430 1 HWI-D00645:88:C7HBDANXX:6:2215:2638:47725 0 chr1 13864 0 1 chr1 11330574 1 HWI-D00645:88:C7HBDANXX:6:2106:14571:65098 1 chr1 13877 0 1 chr11 293293 1 HWI-D00645:88:C7HBDANXX:6:2211:3904:49818 1 chr1 13052 0 1 chr11 627695 1 HWI-D00645:88:C7HBDANXX:6:1102:17272:98283 1 chr1 13039 0 0 chr12 1405896 1 HWI-D00645:88:C7HBDANXX:6:1103:16267:71707 0 chr1 13469 0 0 chr12 207718 1 HWI-D00645:88:C7HBDANXX:6:1313:15280:85241 1 chr1 13503 0 1 chr12 283318 1 I thought it might be the problem of the chromosome name in my inputfile is wrote in strings like "chr1" "chr2" but not in numeric format like "1" "2". But others who put their cases online can run it well with chromosome named as "chr1""chr2". Could you please tell me how to solve it? Thank you very much! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#238>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK2EW6ZSALIDS6VZ2THCLTT7CILLANCNFSM5C63M77Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Neva Cherniavsky Durand, Ph.D. | she, her, hers Assistant Professor | Molecular and Human Genetics Aiden Lab | Baylor College of Medicine www.aidenlab.org

Thank you so much. It's settled.

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

No branches or pull requests

3 participants