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

Ancestry Error: unhandled exception: couldn't open sketch file #59

Closed
bopohdr opened this issue Sep 6, 2020 · 7 comments
Closed

Ancestry Error: unhandled exception: couldn't open sketch file #59

bopohdr opened this issue Sep 6, 2020 · 7 comments

Comments

@bopohdr
Copy link

bopohdr commented Sep 6, 2020

Hi !

I am using Somalier via docker for the relatedness by using:

docker run -v /Users/Somalier:/Somalier brentp/somalier somalier extract -d Somalier/extracted --sites /Somalier/sites.hg38.vcf.gz -f /Somalier/GRCh38.no_alt_analysis_set.fa /Somalier/GLnexus.vcf.gz

and afterwards

docker run -v /Users/Somalier:/Somalier brentp/somalier somalier relate -i -o /Somalier/output_100_samples /Somalier/extracted/'*.somalier'

However, I cannot get to work the ancestry estimation. When running:

docker run -v /Users/Somalier:/Somalier brentp/somalier somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv /Somalier/1kg-somalier/'*.somalier' ++ /Somalier/extracted/'*.somalier'

I get :
somalier version: 0.2.11
depthview.nim(145) read_extracted
Error: unhandled exception: couldn't open sketch file:/Somalier/1kg-somalier/*.somalier [IOError]

I though there is a problem with recognition of the wild card, but it works in the Somalier relate function...

Thank you !

@brentp
Copy link
Owner

brentp commented Sep 6, 2020

did you download the thousand genomes files and untar them into the 1kg-somalier directory?

@bopohdr
Copy link
Author

bopohdr commented Sep 6, 2020

Yes.
I tried to provide a specific file just to see if it works:

docker run -v /Users/Somalier:/Somalier brentp/somalier somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv /Somalier/1kg-somalier/NA21130.somalier ++ /Somalier/extracted/'*.somalier'

and then it cannot find files for the samples of interest:

somalier version: 0.2.11
depthview.nim(145) read_extracted
Error: unhandled exception: couldn't open sketch file:/Somalier/extracted/*.somalier [IOError]

@brentp
Copy link
Owner

brentp commented Sep 6, 2020

can you try: ... ++ '/Somalier/extracted/*.somalier'
so the quotes are around the full path? this is a problem of when the glob is getting expanded.

@bopohdr
Copy link
Author

bopohdr commented Sep 6, 2020

This does not help.

  • For the 1kg files & samples of interest

docker run -v /Users/Somalier:/Somalier brentp/somalier somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv '/Somalier/1kg-somalier/*.somalier' ++ '/Somalier/extracted/*.somalier'

somalier version: 0.2.11
depthview.nim(145) read_extracted
Error: unhandled exception: couldn't open sketch file:/Somalier/1kg-somalier/*.somalier [IOError]

-if provide a single 1kg sample and samples of interest

docker run -v /Users/Somalier:/Somalier brentp/somalier somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv /Somalier/1kg-somalier/NA21130.somalier ++ '/Somalier/extracted/*.somalier'

somalier version: 0.2.11
depthview.nim(145) read_extracted
Error: unhandled exception: couldn't open sketch file:/Somalier/extracted/*.somalier [IOError]

@brentp
Copy link
Owner

brentp commented Sep 6, 2020

maybe try putting the command in a bash script, so: e.g.

in run.sh:

#!/bin/sh
somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv '/Somalier/1kg-somalier/*.somalier' ++ '/Somalier/extracted/*.somalier'

then for docker:

docker run -v /Users/Somalier:/Somalier brentp/somalier run.sh

@bopohdr
Copy link
Author

bopohdr commented Sep 6, 2020

same results:

docker run -v /Users/Somalier:/Somalier brentp/somalier /Somalier/somalier.sh
somalier version: 0.2.11
depthview.nim(145) read_extracted
Error: unhandled exception: couldn't open sketch file:/Somalier/1kg-somalier/*.somalier [IOError]

I also run it via bash terminal (previously in zsh):

  1. without quotes
    docker run -v /Users/Somalier:/Somalier brentp/somalier somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv /Somalier/1kg-somalier/*.somalier ++ /Somalier/extracted/*.somalier somalier version: 0.2.11
    depthview.nim(145) read_extracted
    Error: unhandled exception: couldn't open sketch file:/Somalier/1kg-somalier/*.somalier [IOError]

  2. with quotes
    docker run -v /Users/Somalier:/Somalier brentp/somalier somalier ancestry --labels /Somalier/ancestry-labels-1kg.tsv '/Somalier/1kg-somalier/*.somalier' ++ '/Somalier/extracted/*.somalier' somalier version: 0.2.11
    depthview.nim(145) read_extracted
    Error: unhandled exception: couldn't open sketch file:/Somalier/1kg-somalier/*.somalier [IOError]

@brentp
Copy link
Owner

brentp commented Sep 11, 2020

I just noticed that I haven't implemented the glob handling in the ancestry code. I'll fix this for next release. Meanwhile, you'll have to let your shell expand the glob (don't use quotes around it). If that makes the command-line too long, then wait for next release, I should have it out next week.

@brentp brentp closed this as completed in 05e3b8c Sep 11, 2020
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

No branches or pull requests

2 participants