This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to get data from basespace

I need to get data from basespace, on command line mode (linux, putty).

Is there any scripts/apps do this work?

Thanks!

aws basespace

3 answers

I think that the easiest way has been recently introduced by Illumina with Basemount: http://blog.basespace.illumina.com/2015/07/23/basemount-a-linux-command-line-interface-for-basespace/

It still needs a bit of work but at last they have noticed that there is a (vast) Linux userspace in NGS.

I second BaseMount. I use it every day and while it doesn't overcome some of the problems with the core BaseSpace philosophy of organizing projects and runs, it's a huge improvement over the old solutions for retrieving data.

Yes, there is a way:

https://support.basespace.illumina.com/knowledgebase/articles/403618-python-run-downloader

Great! Thanks a lot!

I'm not familiar with api, but this script works, and I'll learn more with it!

Here's a modified version of Illumina's BaseSpace Python Run Downloader. It takes the project name (instead of the run id) and downloads base calls as fastq files (instead of getting the image/intensity data). It also checks that the sizes of the downloaded files match with what's reported by the BaseSpace REST API, and has rudimentary support for resuming interrupted downloads.

Unfortunately this requires getting an API token and the description you link to is outdated — the “My Apps” link simply leads to the BaseSpace dashboard.

This is a solution using R with library BaseSpaceR (see also this post on SeqAnswers):

library(BaseSpaceR)
ACCESS_TOKEN<- 'dd9...mytoken...43'
PROJECT_ID<- '123456'  ## Get proj ID from url of the project

aAuth<- AppAuth(access_token = ACCESS_TOKEN)
selProj <- Projects(aAuth, id = PROJECT_ID, simplify = TRUE) 
sampl <- listSamples(selProj, limit= 1000)
inSample <- Samples(aAuth, id = Id(sampl), simplify = TRUE)
for(s in inSample){ 
    f <- listFiles(s, Extensions = ".gz")
    print(Name(f))
    getFiles(aAuth, id= Id(f), destDir = 'outdir/', verbose = TRUE)
}

Log in to answer this question.