Mercurial > repos > romaingred > pirna_pipeline
comparison bin/align.pm @ 24:08bbde9d0c9d draft
Uploaded
| author | romaingred |
|---|---|
| date | Mon, 23 Oct 2017 08:16:22 -0400 |
| parents | 39b039d82743 |
| children | bd4b30bff219 |
comparison
equal
deleted
inserted
replaced
| 23:7dd78ad2875f | 24:08bbde9d0c9d |
|---|---|
| 13 our @ISA = qw( Exporter ); | 13 our @ISA = qw( Exporter ); |
| 14 our @EXPORT = qw( &BWA_call &to_build &get_unique &sam_sorted_bam &get_hash_alignment &sam_to_bam_bg &sam_count &sam_count_mis &rpms_rpkm &get_fastq_seq &extract_sam ); | 14 our @EXPORT = qw( &BWA_call &to_build &get_unique &sam_sorted_bam &get_hash_alignment &sam_to_bam_bg &sam_count &sam_count_mis &rpms_rpkm &get_fastq_seq &extract_sam ); |
| 15 | 15 |
| 16 sub to_build | 16 sub to_build |
| 17 { | 17 { |
| 18 my $toBuildHashP = shift; my $log = shift; | 18 my ( $toBuildTabP, $log, $newdir ) = @_; |
| 19 | 19 |
| 20 while ( my ( $k, $v ) = each %{ $toBuildHashP } ) | 20 foreach my $pairs ( @{ $toBuildTabP } ) |
| 21 { | 21 { |
| 22 build_index ( $k, $log ) if $v == 1; | 22 if ( $pairs->[0] == 1 ) |
| 23 } | 23 { |
| 24 my $sym = $newdir.basename(${$pairs->[1]}).'_symlink.fa'; | |
| 25 symlink( ${$pairs->[1]}, $sym ); | |
| 26 ${$pairs->[1]} = $sym; | |
| 27 build_index ( ${$pairs->[1]}, $log ); | |
| 28 } | |
| 29 } | |
| 24 } | 30 } |
| 25 | 31 |
| 26 sub build_index | 32 sub build_index |
| 27 { | 33 { |
| 28 my $to_index = shift; | 34 my $to_index = shift; |
