Mercurial > repos > iuc > bracken
comparison test-data/reproduce_test_data.sh @ 0:b7b1c8bf7ae0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bracken commit 851f81495c875ac09d936537ffd2b32e6af2c8c5"
author | iuc |
---|---|
date | Wed, 16 Oct 2019 16:57:55 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b7b1c8bf7ae0 |
---|---|
1 #!/bin/bash | |
2 | |
3 # This script produces a small kraken2 database containing only a ~1kb portion each of a salmonella and ecoli genome | |
4 # It requires kraken2, art and entrez-direct (all available on bioconda) | |
5 kraken2-build --db test_db --download_taxonomy | |
6 mv test_db/taxonomy/nucl_gb.accession2taxid test_db/taxonomy/nucl_gb.accession2taxid_full | |
7 grep -e 'NC_003198.1' -e 'NC_011750.1' test_db/taxonomy/nucl_gb.accession2taxid_full > test_db/taxonomy/nucl_gb.accession2taxid | |
8 esearch -db nucleotide -query "NC_003198.1" | efetch -format fasta > NC_003198.1.fasta | |
9 esearch -db nucleotide -query "NC_011750.1" | efetch -format fasta > NC_011750.1.fasta | |
10 head -n 14 NC_003198.1.fasta > NC_003198.1_1kb.fasta | |
11 head -n 14 NC_011750.1.fasta > NC_011750.1_1kb.fasta | |
12 kraken2-build --db test_db --add-to-library NC_003198.1_1kb.fasta | |
13 kraken2-build --db test_db --add-to-library NC_011750.1_1kb.fasta | |
14 kraken2-build --db test_db --build | |
15 | |
16 # Simulate 100bp reads from ~1kb portions of genomes | |
17 art_illumina -sam -i NC_011750.1_1kb.fasta -p -m 300 -f 10 -s 10 -l 100 -o NC_011750.1_simulated_R | |
18 art_illumina -sam -i NC_003198.1_1kb.fasta -p -m 300 -f 10 -s 10 -l 100 -o NC_003198.1_simulated_R | |
19 | |
20 # Generate kraken reports | |
21 kraken2 --db test_db --report NC_011750.1_simulated_kraken_report.txt --paired NC_011750.1_simulated_R1.fastq NC_011750.1_simulated_R2.fastq | |
22 kraken2 --db test_db --report NC_003198.1_simulated_kraken_report.txt --paired NC_003198.1_simulated_R1.fastq NC_003198.1_simulated_R2.fastq | |
23 | |
24 # Build bracken kmer distribution files using default kmer-len=35 and read-len=100 | |
25 bracken-build -d test_db | |
26 | |
27 # | |
28 # est_abundance.py --kmer_distr test_db/database100mers.kmer_distrib --level S -i NC_003198.1_simulated_kraken_report.txt -o NC_003198.1_simulated_bracken_report.txt | |
29 # est_abundance.py --kmer_distr test_db/database100mers.kmer_distrib --level S -i NC_011750.1_simulated_kraken_report.txt -o NC_011750.1_simulated_bracken_report.txt |