Skip to content

Commit e87ff30

Browse files
Merge pull request #62 from compbiocore/develop
Remove Pkg.activate(@__DIR__) from viva script
2 parents 2116bf1 + c7b5883 commit e87ff30

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

viva

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ println("1/5 ArgParse")
1010
using ArgParse
1111

1212
println("2/5 VariantVisualization")
13-
using Pkg #remove after VariantVisualization is deployed
14-
Pkg.activate(@__DIR__) #remove after VariantVisualization is deployed
13+
#using Pkg #remove after VariantVisualization is deployed
14+
#Pkg.activate(@__DIR__) #remove after VariantVisualization is deployed
1515
using VariantVisualization
1616

1717
println("3/5 PlotlyJS")
@@ -477,16 +477,22 @@ if parsed_args["heatmap"] == "genotype,read_depth" || parsed_args["heatmap"] ==
477477
println("Saving genotype heatmap")
478478

479479
if parsed_args["num_array"] == true
480+
480481
save_numerical_array(gt_num_array,sample_names,chr_pos_tuple_list,title,output_directory)
482+
481483
end
482484

483485
save_graphic(graphic,output_directory,save_ext,title,remote_option)
484486

485487
if parsed_args["heatmap_title"] != nothing
488+
486489
title = "Read_Depth_$(parsed_args["heatmap_title"])"
490+
487491
else
492+
488493
bn = Base.Filesystem.basename(parsed_args["vcf_file"])
489494
title = "Read_Depth_$bn"
495+
490496
end
491497

492498
dp_num_array,dp_chromosome_labels = combined_all_read_depth_array_functions(sub)
@@ -498,14 +504,17 @@ if parsed_args["heatmap"] == "genotype,read_depth" || parsed_args["heatmap"] ==
498504
if length(parsed_args["group_samples"]) == 2
499505

500506
if parsed_args["select_samples"] != nothing && length(parsed_args["group_samples"]) != 2
507+
501508
println("Selecting samples listed in $(parsed_args["select_samples"])")
502509
dp_num_array,col_selectedcolumns = select_columns(parsed_args["select_samples"], dp_num_array, sample_names)
503510
sample_names=col_selectedcolumns
504511

505512
elseif parsed_args["select_samples"] != nothing && length(parsed_args["group_samples"]) == 2
513+
506514
#sample selection occurs in this case during sample grouping step.
507515
#when using sample grouping and selection options, sample metadata matric should have the same sample names as the selection list.
508516
#improvement note for developers: make function to check that sample ids in metadata matrix and sample selection list match. If not, print error and choose to go with metadata matrix sample ids.
517+
509518
end
510519

511520
group_trait_matrix_filename=((parsed_args["group_samples"])[1])
@@ -515,7 +524,9 @@ if parsed_args["heatmap"] == "genotype,read_depth" || parsed_args["heatmap"] ==
515524
dp_num_array_limited=read_depth_threshhold(ordered_dp_num_array)
516525

517526
if parsed_args["num_array"] == true
518-
save_numerical_array(ordered_dp_num_array,sample_names,chr_pos_tuple_list,title,output_directory)
527+
528+
save_numerical_array(ordered_dp_num_array,sample_names,chr_pos_tuple_list,title,output_directory)
529+
519530
end
520531

521532
pheno_num_array,trait_label_array,chrom_label_info = add_pheno_matrix_to_dp_data_for_plotting(dp_num_array_limited,pheno,trait_labels,chrom_label_info,number_rows)
@@ -525,19 +536,23 @@ if parsed_args["heatmap"] == "genotype,read_depth" || parsed_args["heatmap"] ==
525536
else
526537

527538
if parsed_args["select_samples"] != nothing && length(parsed_args["group_samples"]) != 2
539+
528540
println("Selecting samples listed in $(parsed_args["select_samples"])")
529541

530542
dp_num_array,col_selectedcolumns = select_columns(parsed_args["select_samples"], dp_num_array, sample_names)
531543
sample_names=col_selectedcolumns
532544

533545
elseif parsed_args["select_samples"] != nothing && length(parsed_args["group_samples"]) == 2
546+
534547
#sample selection occurs in this case during sample grouping step.
535548
#when using sample grouping and selection options, sample metadata matric should have the same sample names as the selection list.
536549
#improvement note for developers: make function to check that sample ids in metadata matrix and sample selection list match. If not, print error and choose to go with metadata matrix sample ids.
537550
end
538551

539552
if parsed_args["num_array"] == true
540-
save_numerical_array(dp_num_array,sample_names,chr_pos_tuple_list,title,output_directory)
553+
554+
save_numerical_array(dp_num_array,sample_names,chr_pos_tuple_list,title,output_directory)
555+
541556
end
542557

543558
dp_num_array_limited=read_depth_threshhold(dp_num_array)

0 commit comments

Comments
 (0)