how to get data from basespace
3
2
Entering edit mode
10.1 years ago
polangxin ▴ 80

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

Is there any scripts/apps do this work?

Thanks!

aws basespace • 11k views
ADD COMMENT
3
Entering edit mode
9.2 years ago
IV ★ 1.3k

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.

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
2
Entering edit mode
ADD COMMENT
1
Entering edit mode

Great! Thanks a lot!

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
2
Entering edit mode
10.1 years ago

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)
}
ADD COMMENT

Login before adding your answer.

Traffic: 2340 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6