ay-lab / fithic

Fit-Hi-C is a tool for assigning statistical confidence estimates to chromosomal contact maps produced by genome-wide genome architecture assays such as Hi-C.
MIT License
79 stars 16 forks source link

error while using fithic for the interchromosomal interactions #25

Closed Nohaosma closed 4 years ago

Nohaosma commented 5 years ago

Dear Dr. Ay, I used fithic for the intrachromosomal contacts and it worked perfectly. I am trying to use fithic 2.0.7 for the interchromosomal contacts and here is my command:

python fithic.py -f fragments_list.gz -i chr9_chrX_1mb_fithic.gz -o test/ -r 1000000 -t bias.gz -x All python fithic.py -f fragments_list.gz -i chr9_chrX_1mb_fithic.gz -o test/ -r 1000000 -t bias.gz -x interOnly

but it gives me this error:

File "fithic.py", line 310, in main (binStats,noOfFrags, maxPossibleGenomicDist, possibleIntraInRangeCount, possibleInterAllCount, interChrProb, baselineIntraChrProb)= generate_FragPairs(binStats, fragsFile, resolution) File "fithic.py", line 560, in generate_FragPairs currBin = binStats[binTracker] KeyError: 0

Can you help me solve this issue???

Best regards, Noha

aryakaul commented 5 years ago

Hey Noha! Could you provide the output of the following commands?

zcat fragments_list.gz | cut -f1 | sort | uniq -c zcat chr9_chrX_1mb_fithic.gz | cut -f1 | sort | uniq -c zcat chr9_chrX_1mb_fithic.gz | cut -f3 | sort | uniq -c

Also, does the '-x All' command also throw this error or just the 'interOnly'?

Nohaosma commented 5 years ago

zcat fragments_list.gz | cut -f1 | sort | uniq -c

250 chr1
136 chr10
136 chr11
134 chr12
116 chr13
108 chr14
103 chr15
 91 chr16
 82 chr17
 79 chr18
 60 chr19
244 chr2
 64 chr20
 49 chr21
 52 chr22
199 chr3
192 chr4
181 chr5
172 chr6
160 chr7
147 chr8
142 chr9
156 chrX
 60 chrY

zcat chr9_chrX_1mb_fithic.gz | cut -f1 | sort | uniq -c

17245 9

zcat chr9_chrX_1mb_fithic.gz | cut -f3 | sort | uniq -c

17245 X

Also, does the '-x All' command also throw this error or just the 'interOnly'?

I tried both and both gave the same error

Thank you so much


From: luak notifications@github.com Sent: Monday, July 29, 2019 3:49:11 PM To: ay-lab/fithic fithic@noreply.github.com Cc: Noha Osman nosman3@lsu.edu; Author author@noreply.github.com Subject: Re: [ay-lab/fithic] error while using fithic for the interchromosomal interactions (#25)

Hey Noha! Could you provide the output of the following commands?

zcat fragments_list.gz | cut -f1 | sort | uniq -c zcat chr9_chrX_1mb_fithic.gz | cut -f1 | sort | uniq -c zcat chr9_chrX_1mb_fithic.gz | cut -f3 | sort | uniq -c

Also, does the '-x All' command also throw this error or just the 'interOnly'?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fay-lab%2Ffithic%2Fissues%2F25%3Femail_source%3Dnotifications%26email_token%3DAMSGQVXSONMSIDZ74X57CGDQB5JUPA5CNFSM4IG4LHP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3B6ZPI%23issuecomment-516156605&data=02%7C01%7Cnosman3%40lsu.edu%7Cc064de3c5b674126619208d714663617%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637000301533912409&sdata=2AAFfVUfPfr%2BnDQ3oWARzNRh05kzpl6LitqJURTYPes%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMSGQVQAJX6OH64G2RRX43LQB5JUPANCNFSM4IG4LHPQ&data=02%7C01%7Cnosman3%40lsu.edu%7Cc064de3c5b674126619208d714663617%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637000301533912409&sdata=L8aOtrq7Z%2BCjCwB7w8rw1BCYTTHZtg4WN0YcF9Vkbyo%3D&reserved=0.

aryakaul commented 5 years ago

I believe the error is because you are using a frag file with extra chromosomes not located in the interactions file. Remake the frags file keeping only lines that contain chr9 and chrX and try using that with FitHiC. Let me know if this fixes it!

Nohaosma commented 5 years ago

Dear Luak,

I did that and it gave me the same error.

I did grep only chromosome X and chromosome9 from the fragments list and tried it with -x All and didn't work and I tried with -x interOnly and it did not work too.

I am sorry for bothering you and thank you so much for your kind help

Best regards,

Noha Osman


From: luak notifications@github.com Sent: Tuesday, July 30, 2019 1:25:39 PM To: ay-lab/fithic fithic@noreply.github.com Cc: Noha Osman nosman3@lsu.edu; Author author@noreply.github.com Subject: Re: [ay-lab/fithic] error while using fithic for the interchromosomal interactions (#25)

I believe the error is because you are using a frag file with extra chromosomes not located in the interactions file. Remake the frags file keeping only lines that contain chr9 and chrX and try using that with FitHiC. Let me know if this fixes it!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fay-lab%2Ffithic%2Fissues%2F25%3Femail_source%3Dnotifications%26email_token%3DAMSGQVVTAG64EELDAW7EZUTQCCBSHA5CNFSM4IG4LHP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3E3TMA%23issuecomment-516536752&data=02%7C01%7Cnosman3%40lsu.edu%7Cae8c7eb8f9c5481cde1e08d7151b5347%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637001079430373643&sdata=hgAFbFq49eVUij9ScaeZPrtk2KDQhitJQ7P2oaWdHmQ%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMSGQVXBL3QQ22UWVFVAZK3QCCBSHANCNFSM4IG4LHPQ&data=02%7C01%7Cnosman3%40lsu.edu%7Cae8c7eb8f9c5481cde1e08d7151b5347%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637001079430373643&sdata=5SLMzjdanfo1EUGWXrXU%2FVomfGj5Xpm7xG5IPDLn5no%3D&reserved=0.

aryakaul commented 5 years ago

No problem! Would you be able to send over the log file that's created up until this point? You can send it to akaul@lji.org or if its short enough just paste it here.