X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fformat_genome;h=35aa8b3af7354de14d65ef00aa444ebed767e149;hb=29472b5aae00354d6b521fcdca902d09e08f7823;hp=af7de5c4ca25f3e18f5a64eeb85baff16a554055;hpb=b2008721fa901786cffa408fa518dbe443634f7a;p=biopieces.git diff --git a/bp_bin/format_genome b/bp_bin/format_genome index af7de5c..35aa8b3 100755 --- a/bp_bin/format_genome +++ b/bp_bin/format_genome @@ -31,6 +31,7 @@ use strict; use Maasha::Fasta; use Maasha::Biopieces; use Maasha::Bowtie; +use Maasha::BWA; use Maasha::NCBI; use Maasha::Match; use Maasha::UCSC; @@ -44,7 +45,7 @@ my ( $default, $formats, $options, $in, $out, $record, $data_out, $entry, $tmp_dir = Maasha::Biopieces::get_tmpdir(); $default = $ENV{ 'BP_DATA' }; -$formats = 'fasta,blast,vmatch,bowtie,phastcons'; +$formats = 'fasta,blast,vmatch,bowtie,bwa,phastcons'; $options = Maasha::Biopieces::parse_options( [ @@ -64,7 +65,7 @@ $genome = $options->{ 'genome' }; Maasha::Filesys::dir_create_if_not_exists( "$dir/genomes" ); Maasha::Filesys::dir_create_if_not_exists( "$dir/genomes/$genome" ); -if ( grep { $_ =~ /fasta|blast|vmatch|bowtie/i } @{ $options->{ "formats" } } ) +if ( grep { $_ =~ /fasta|blast|vmatch|bowtie|bwa/i } @{ $options->{ "formats" } } ) { if ( -f "$dir/genomes/$genome/fasta/$genome.fna" ) { @@ -117,6 +118,7 @@ foreach $format ( @{ $options->{ 'formats' } } ) elsif ( $format =~ /^blat$/i ) { warn "BLAT FORMAT NOT IMPLEMENTED" } elsif ( $format =~ /^vmatch$/i ) { Maasha::Match::vmatch_index( "$genome.fna", $fasta_dir, "$dir/genomes/$genome/vmatch", $tmp_dir ) } elsif ( $format =~ /^bowtie$/i ) { Maasha::Bowtie::bowtie_index( "$fasta_dir/$genome.fna", "$dir/genomes/$genome/bowtie", $genome, $options->{ 'verbose' } ) } + elsif ( $format =~ /^bwa$/i ) { Maasha::BWA::bwa_index( "$fasta_dir/$genome.fna", "$dir/genomes/$genome/bwa", $genome, $options->{ 'verbose' } ) } elsif ( $format =~ /^phastcons$/i ) { Maasha::UCSC::phastcons_index( "$genome.pp", $phastcons_dir ) } print STDERR qq(done.\n) if $options->{ 'verbose' };