|
28 | 28 |
|
29 | 29 | #------------------------------------------------------------------------------------------------------
|
30 | 30 | #Set parameters:
|
31 |
| -my @need = ('chrs', 'strand', 'mincov', 'maxcov', 'str', 'bam', 'bed', 'out', 'ref', 'sam', 'bcf', 'tfam', 'rprefix', 'tprefix', 'add', 'nocheck', 'vcf'); |
| 31 | +my @need = ('chrs', 'strand', 'mincov', 'maxcov', 'str', 'bam', 'bed', 'out', 'ref', 'sam', 'bcf', 'tfam', 'prefix', 'add', 'nocheck', 'vcf'); |
32 | 32 | my ($last_autosome, $strand, $min_cov, $max_cov, $bam_list, $bed, $out, $ngs_vcf, $ngs_tped, $refseq, $samtools, $bcftools, $ngs_tfam, $ref_prefix, $tped_prefix, $add, $nocheck, $vcf);
|
33 | 33 | my $str = 'high'; #default
|
34 | 34 | use vars qw(%varshash $varshash %paramhash $paramhash %tophash $tophash %comphash $comphash %maphash $maphash %vcfhash $vcfhash %arrayhash $arrayhash);
|
|
41 | 41 | STORE_VARS: foreach my $elem (@ARGV) {
|
42 | 42 | my $what = ''; my $is = '';
|
43 | 43 | if ($elem=~m/\S\=\S/) { #no spaces separating args/vals, split as normal.
|
44 |
| - ($what, $is) = split('=',$elem); |
| 44 | + ($what, $is) = split('=',$elem); |
45 | 45 | }
|
46 | 46 | else {#user error: whitespace separating arguments and values. Make sure no matter how many spaces and where, the args and vals can still be set.
|
47 | 47 | $elem=~s/\s//; $elem=~s/\=//; #remove whitespace and equal sign if present. Is the value an argument ($store is not filled) or is it a value ($store is filled with the argument label)
|
|
230 | 230 | } $exists = '';
|
231 | 231 |
|
232 | 232 | #Chromosomal prefix in reference fasta:
|
233 |
| -if ($varshash->{rprefix}->{value}) { |
234 |
| - $ref_prefix = $varshash->{rprefix}->{value}; #If no chromosomal prefix is given, program will use default of no prefix, eg 1 instead of chr1 or chrom1. |
| 233 | +if ($varshash->{prefix}->{value}) { |
| 234 | + $ref_prefix = $varshash->{prefix}->{value}; #If no chromosomal prefix is given, program will use default of no prefix, eg 1 instead of chr1 or chrom1. |
| 235 | + $tped_prefix = $varshash->{prefix}->{value}; |
235 | 236 | $var_summary.= "Chromosomal prefix in reference fasta: $ref_prefix\n";
|
236 | 237 | }
|
237 | 238 |
|
238 |
| -#Chromosomal prefix to include in SNP ID in output tped: |
239 |
| -if ($varshash->{tprefix}->{value}) { |
240 |
| - $tped_prefix = $varshash->{tprefix}->{value}; #If no chromosomal prefix is given, program will use default of no prefix, eg 1 instead of chr1 or chrom1. |
241 |
| - $var_summary.= "Chromosomal prefix to include in SNP ID: $tped_prefix\n"; |
242 |
| -} |
243 |
| - |
244 | 239 | #Create new BED file with prefix:
|
245 | 240 | if ($varshash->{add}->{value}) {
|
246 | 241 | $add = $varshash->{add}->{value}; if ($add=~m/true/i) { $add = 1; } else { $add = 0; } #Adds the above prefix to the BED marker file.
|
|
0 commit comments