Skip to content

Instantly share code, notes, and snippets.

@hussius
Last active December 11, 2020 15:45
Show Gist options
  • Save hussius/bc4d5ed5b4f0d6821e25 to your computer and use it in GitHub Desktop.
Save hussius/bc4d5ed5b4f0d6821e25 to your computer and use it in GitHub Desktop.
Kallisto setup
# Download Kallisto and sratools (the latter to be able to download from SRA)
wget https://github.com/pachterlab/kallisto/releases/download/v0.42.3/kallisto_mac-v0.42.3.tar.gz
tar zvxf kallisto_mac-v0.42.3.tar.gz
wget http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.5.2/sratoolkit.2.5.2-mac64.tar.gz
tar zxvf sratoolkit.2.5.2-mac64.tar.gz
# Download and merge human cDNA and ncDNA files from Ensembl for the index.
wget ftp://ftp.ensembl.org/pub/current_fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz
wget ftp://ftp.ensembl.org/pub/current_fasta/homo_sapiens/ncrna/Homo_sapiens.GRCh38.ncrna.fa.gz
cat Homo_sapiens.GRCh38.cdna.all.fa.gz Homo_sapiens.GRCh38.ncrna.fa.gz > Homo_sapiens.GRCh38.rna.fa.gz
# Build the transcriptome index.
time kallisto/kallisto index -i hsGRCh38_kallisto Homo_sapiens.GRCh38.rna.fa.gz
# (note: works with gzipped files)
# Loop which downloads data from SRA, runs Kallisto with bootstrapping, and deletes the files
for f in SRR057629 SRR057630 SRR057632 SRR057649 SRR057650 SRR057651
do sratoolkit.2.5.2-mac64/bin/fastq-dump --split-files $f
time kallisto/kallisto quant -i hsGRCh38_kallisto -b 100 ${f}_1.fastq ${f}_2.fastq -o ${f}
rm ${f}_?.fastq
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment