Mercurial > repos > jdv > nanopolish
comparison nanopolish_variants.pl @ 9:f1141f6a2d65 draft
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/nanopolish commit 0ace87b59137f1ed770db97fbb33036e16205edf
author | jdv |
---|---|
date | Mon, 12 Feb 2018 23:15:26 -0500 |
parents | b437c0a7ca04 |
children | c00a942cfc0b |
comparison
equal
deleted
inserted
replaced
8:b437c0a7ca04 | 9:f1141f6a2d65 |
---|---|
116 my @out_files = glob "$tmp_dir/*.vcf"; | 116 my @out_files = glob "$tmp_dir/*.vcf"; |
117 | 117 |
118 open my $out_cons, '>', $fn_consensus | 118 open my $out_cons, '>', $fn_consensus |
119 or die "Failed to open output consensus: $!"; | 119 or die "Failed to open output consensus: $!"; |
120 for (@fa_files) { | 120 for (@fa_files) { |
121 open my $in, '<', $_; | 121 my $parser = BioX::Seq::Stream->new($_); |
122 while (my $line = <$in>) { | 122 while (my $seq = $parser->next_seq) { |
123 print {$out_cons} $line; | 123 $seq->id =~ s/^.+\K:\d+-\d+$//; # strip coordinates from ID |
124 print {$out_cons} $seq->as_fasta; | |
124 } | 125 } |
125 close $in; | |
126 } | 126 } |
127 close $out_cons; | 127 close $out_cons; |
128 | 128 |
129 # we may need to do extra processing on VCF output | 129 # we may need to do extra processing on VCF output |
130 open my $out_vcf, '>', $fn_outfile | 130 open my $out_vcf, '>', $fn_outfile |