For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to download only FASTQs from a BaseSpace project using BaseSpace CLI

The BaseSpace CLI download command coupled with the --extension fastq.gz option will download all FASTQs stored in the specified Project:

bs download project -i <ProjectID> -o <Destination> --extension fastq.gz  

To download a subset of specific files such as a subset of FASTQ files from a BaseSpace project it is possible to use the contents command to list all files, then filter them as desired before downloading. Here is an example way to download all Lane 1 FASTQ files of sample names ending with "Rep1" to the current directory.

Windows:

bs contents project -i <ProjectID> -f csv > files-in-project.csv    
findstr /R "Rep1\_.\*L001.\*fastq.gz" files-in-project.csv > filtered-fastqfiles-in-project.csv    
for /f "tokens=1 delims=," %a in (filtered-fastqfiles-in-project.csv) do bs download file -i %a -o . --no-metadata  

Unix/Mac:

bs contents project -i <ProjectID> -f csv > files-in-project.csv    
grep 'Rep1\_.\*L001.\*fastq.gz' files-in-project.csv > filtered-fastqfiles-in-project.csv    
while IFS=',' read -r first\_value rest; do bs download file -i "$first\_value" -o . --no-metadata; done < filtered-fastqfiles-in-project.csv  

It is possible to filter results directly using contents command with combination of exclude and include options

bs contents project -i 395620236 -f csv --exclude=\* --include=\*Rep1\_\*L001\*.fastq.gz > filtered-fastqfiles-in-project.csv  

For further information, see CLI examples page. For more information on listing entities, see How to list BaseSpace entities using BaseSpace CLI For uploading FASTQ or downloading FASTQ files from an input run folder, see How to upload and download FASTQ files to BaseSpace with BaseSpace CLI

For any feedback or questions regarding this article (Illumina Knowledge Article #3376), contact Illumina Technical Support techsupport@illumina.com.

Last updated

Was this helpful?