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

read compressed files from a URL #163

Closed
katwre opened this issue May 4, 2015 · 2 comments
Closed

read compressed files from a URL #163

katwre opened this issue May 4, 2015 · 2 comments

Comments

@katwre
Copy link

@katwre katwre commented May 4, 2015

Here is an example with an error:

l <- "http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeHaibMethylRrbs/wgEncodeHaibMethylRrbsImr90UwSitesRep1.bed.gz"
d <- read_delim(l, delim="\t")
Error in collectorsGuess(source, tokenizer, n = 100) : 
  embedded nul in string: '\x89\032\xc7\003\f\xc4#}\xe8\xda\xf5\xbb\x80\xf1\0\023ēo\026O\xe4#\x98Ч\x92\b\xe3\021L\xe4\xf3\xb0\x88\xe3A\006|\xce7澯\xb6n\xeaT\xea\xce\xe7]\\\030\xea|\xb2>$7\xb4\xeb9\xb1ʺ\xf0\xf9u\xa1\031\xd7,~\xbe\177&\xbc\xca\xc5\xea\016\xbd\004t\xbe\x82\xef\xbfR\x8fY_Y\xfa\xfd\xaa\\Ot\x8dH\xc0\x97\xfd\xbb\xbe\027l\xea\xbb\177\xd5Ýw\xa6\v\xe2|K\xbf\xe4\xe7\xd8<\xf9\xad\xeb\x93;Uu\xcbh\003\xf9\xd94\022\x9f\x8b\x95ɦ\037\027\xf2\xbd\xde;\xa7\xa7\xb0\xd2qm3C\xf1\xe7\003\xbf\037#\xed}X\xbd\xb1\x97\xa0b\xaf\xc4J?V\xe8\x85T\xe8U\xf8/\026]\x93I\xeb6\032\x8a?'Iy\xb5\x97U\x8a\xbd\004\025{eV\xe5\017/\xa4B\xaf\xce\177Q\x97Ð]\002\xf2j\001;\x89\x94\xae\xb1AT\x82\xe2\xd7\xe7#\032\x9a\xe5\xe7e\025\x86%\xa1 \xac\x91D\xca|\x84\177]\xc8\xfb\x80Τ\xc2\xca\177\025'
@maehler
Copy link

@maehler maehler commented Jun 11, 2015

I just experienced the same issue:

> read_tsv("ftp://plantgenie.org/Data/PopGenIE/Populus_tremula/v1.0/Annotation/Potra01_GO.tsv.gz")
Error in collectorsGuess(source, tokenizer, n = 100) : 
  embedded nul in string: '\f\xcc\xfa\xb2Q\x9b\0g\024\xfb\xeam\a\xb1_*\x9f\x89P\017\xa7\xa4\xf2\031O\0\xbcP'

If I download the file first it works fine.

@npjc
Copy link
Contributor

@npjc npjc commented Jun 18, 2015

And another...

read_* lets you read in a .gz file and also lets you download a file from a url.

It does not however decompress a file downloaded from a url:

a_url <- "ftp://data.modencode.org/D.melanogaster/Histone-Modification/ChIP-chip/computed-peaks_gff3/H3K9acS10P%3aCell-Line=S2-DRSC%23Developmental-Stage=Late-Embryonic-stage%23Tissue=Embryo-derived-cell-line%3aChIP-chip%3aRep-1%3a%3aDmel_r5.32%3amodENCODE_2660.gff3.gz"

readr::read_tsv(a_url, skip = 100)
#> Error in collectorsGuess(source, tokenizer, n = 100) : 
#>   embedded nul in string: '\x91\xff\xa9\017b\xac\036\x823\xf2~\xd0\025^\xec\xe5\xc9!\005\x8d\0\032\xb5=R~\xf0]\xf4\020\x9c\xb1\xf8]3y\xa1\x98\xd7L\xa7\xc9J4E\xf1\xf7\xbe\x8fB\xf5\020\x9cQ\xafo]&\xbc@v\xc4\xc5Ljd`>F\xaa\xf7Y\xfd\036\x823\x9a\xf2h\xea.e\xb1\x9b\x91\xc7' 

(if you download the file and read_tsv it in from disk all is well).

I would have expected that download+decompress. If this is possible it would be great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants