Mercurial > repos > iuc > kma
comparison test-data/generate_test_data.sh @ 0:e74a31040224 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kma commit 43bbde4f8f8671284b2acb21dfd2657de4ba967f"
| author | iuc |
|---|---|
| date | Sat, 15 Feb 2020 20:32:33 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:e74a31040224 |
|---|---|
| 1 #!/usr/bin/bash | |
| 2 | |
| 3 # E. coli locus b0842 (b0842.fasta.gz) downloaded from Enterobase E. coli cgMLST scheme | |
| 4 # requires: wget, kma, bwa, samtools, bedtools | |
| 5 | |
| 6 gunzip b0842.fasta.gz | |
| 7 | |
| 8 # Take first 5 alleles to reduce size of test data | |
| 9 mkdir ecoli_cgMLST | |
| 10 head -n 10 b0842.fasta > ecoli_cgMLST/ecoli_b0842_1to5.fasta | |
| 11 | |
| 12 kma index -k 8 -i ecoli_cgMLST/ecoli_b0842_1to5.fasta -o ecoli_cgMLST/ecoli_b0842_1to5 | |
| 13 | |
| 14 wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR884/ERR884056/ERR884056_1.fastq.gz | |
| 15 | |
| 16 # Use bwa to map reads to reduced E. coli locus b0842 | |
| 17 # and extract only mapped reads (to reduce size of test dataset) | |
| 18 bwa index ecoli_cgMLST/ecoli_b0842_1to5.fasta | |
| 19 | |
| 20 bwa mem ecoli_cgMLST/ecoli_b0842_1to5.fasta ERR884056_1.fastq.gz -o ERR884056_1_ecoli_b0842_1to5.sam | |
| 21 | |
| 22 samtools view ERR884056_1_ecoli_b0842_1to5.sam -bo ERR884056_1_ecoli_b0842_1to5.bam | |
| 23 | |
| 24 # Select mapped reads | |
| 25 samtools view -b -F 4 ERR884056_1_ecoli_b0842_1to5.bam > ERR884056_1_ecoli_b0842_1to5.mapped.bam | |
| 26 | |
| 27 samtools sort -n ERR884056_1_ecoli_b0842_1to5.mapped.bam -o ERR884056_1_ecoli_b0842_1to5.mapped.sort.bam | |
| 28 | |
| 29 bedtools bamtofastq -i ERR884056_1_ecoli_b0842_1to5.mapped.sort.bam -fq ERR884056_ecoli_b0842.mapped_R1.fastq | |
| 30 |
