Skip to content

Instantly share code, notes, and snippets.

@yk-tanigawa
Created February 23, 2016 02:34
Show Gist options
  • Save yk-tanigawa/72fb4d2f560fc7ea3cc4 to your computer and use it in GitHub Desktop.
Save yk-tanigawa/72fb4d2f560fc7ea3cc4 to your computer and use it in GitHub Desktop.
NCBI SRA (Short Read Archive) 形式から fastq 形式に変換する Makefile ref: http://qiita.com/yk-tanigawa/items/f78834d697daf23378b0
## commands
FASTQ-DUMP = /somewhere/fastq-dump
## files
FASTQ1 = $(SRA:%.sra=%_1.fastq)
FASTQ2 = $(SRA:%.sra=%_2.fastq)
all: $(FASTQ1) $(FASTQ2)
# obtain the paired-end fastq files from a given sra file
$(FASTQ1) $(FASTQ2): $(SRA)
$(FASTQ-DUMP) --qual-filter --split-files $<
## commands
FASTQ-DUMP = /somewhere/fastq-dump
## files
FASTQ = $(SRA:%.sra=%.fastq)
all: $(FASTQ)
# obtain the fastq file from a given sra file
$(FASTQ): $(SRA)
$(FASTQ-DUMP) --qual-filter $<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment