Skip to content

Commit 6a2e54d

Browse files
committed
Fixed error when adding chromosomal prefix. This feature now works.
1 parent d21a4f0 commit 6a2e54d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

ArrayMaker.pl

+5-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#------------------------------------------------------------------------------------------------------
3030
#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');
3232
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);
3333
my $str = 'high'; #default
3434
use vars qw(%varshash $varshash %paramhash $paramhash %tophash $tophash %comphash $comphash %maphash $maphash %vcfhash $vcfhash %arrayhash $arrayhash);
@@ -41,7 +41,7 @@
4141
STORE_VARS: foreach my $elem (@ARGV) {
4242
my $what = ''; my $is = '';
4343
if ($elem=~m/\S\=\S/) { #no spaces separating args/vals, split as normal.
44-
($what, $is) = split('=',$elem);
44+
($what, $is) = split('=',$elem);
4545
}
4646
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.
4747
$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,17 +230,12 @@
230230
} $exists = '';
231231

232232
#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};
235236
$var_summary.= "Chromosomal prefix in reference fasta: $ref_prefix\n";
236237
}
237238

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-
244239
#Create new BED file with prefix:
245240
if ($varshash->{add}->{value}) {
246241
$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

Comments
 (0)