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

PathEx butchers URLs #46

Closed
nsheff opened this issue May 16, 2019 · 2 comments

Comments

@nsheff
Copy link
Contributor

commented May 16, 2019

Give a genome_server attribute with a URL like http://localhost and the PathEx functionality of attmap is removing the double-slash, rendering the URL incorrect

In [66]: obj                                                                                                                       
Out[66]: 
YacAttMap
genome_folder: $GENOMES
genome_server: http://localhost
genomes:
  hg38:
    bowtie2: indexed_bowtie2
    hisat2: indexed_hisat2
    tss_annotation: TSS.bed.gz
    gtf: blah.gtf
  mm10:
    bowtie2: indexed_bowtie2
    blacklist: blacklist/mm10.bed
  rCRSd:
    bowtie2: indexed_bowtie2
    bowtie: indexed_bowtie

In [67]: obj.genome_server                                                                                                         
Out[67]: 'http:/localhost'

is there any way to do a url-aware path expansion that will expand env variables, but not ruin urls?

using version 0.11

@nsheff nsheff added the bug label May 16, 2019

@nsheff

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

hmm, it doesn't look like this is coming from the built-in expandvars function

In [68]: os.path.expandvars("http://blah")                                                                                         
Out[68]: 'http://blah'

In [69]: os.path.expandvars("$GENOMES")                                                                                            
Out[69]: '/ext/yeti/genomes/'

@vreuter vreuter added this to the 0.12 milestone May 16, 2019

@nsheff

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

sweet.

@vreuter vreuter closed this in b207478 May 16, 2019

@nsheff nsheff referenced this issue Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.