Previous changeset 19:0044b989f60f (2019-06-10) Next changeset 21:f8b2de0d849f (2019-06-10) |
Commit message:
Uploaded paryml fix |
added:
0348637001560173633/annovar_yaml/YAML_annovar.yml 0348637001560173633/annovar_yaml/YAML_arguments_annovar.yml 0348637001560173633/annovar_yaml/annovar_yaml.pl 0348637001560173633/annovar_yaml/annovar_yaml.xml |
removed:
annovar_yaml/YAML_annovar.yml annovar_yaml/YAML_arguments_annovar.yml annovar_yaml/annovar_yaml.pl annovar_yaml/annovar_yaml.xml |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 0348637001560173633/annovar_yaml/YAML_annovar.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0348637001560173633/annovar_yaml/YAML_annovar.yml Mon Jun 10 09:34:27 2019 -0400 |
b |
@@ -0,0 +1,72 @@ +GENERAL: + - APPLICATION: 'annovar' + PATHSCRIPTS: '/hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' + CODING_ANNOVAR: 'coding_annovar.pl' + TABLE_ANNOVAR: 'table_annovar.pl' + LOCATION_DATABASE: ' /hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' + DOT2UNDERLINE: 'yes' + NASTRING: '.' + OTHERINFO: 'yes' + POLISH: 'yes' + REMOVE: 'yes' + THREAD: '8' + INPUTFORMAT: 'vcfinput' + SPECIES: 'human' + BUILD: 'hg19' +ANALYSIS: + DATABASES: + - NAME: 'cosmic84' + ALIAS: 'N/A' + PROTOCOL: 'cosmic' + VERSION: '84' + COMMENT: '20190221' + AVAILABLE: 'yes' + REQUIRED: 'yes' + OPERATION: 'f' + COLSWANTED: '4' + - NAME: 'refgene19' + ALIAS: 'N/A' + PROTOCOL: 'refgene' + VERSION: '19' + AVAILABLE: 'yes' + REQUIRED: 'yes' + COMMENT: '20190210' + OPERATION: 'g' + HGVS: 'yes' + SPLICING: '6' + EXONSPLIC: 'yes' + - NAME: 'ncbiRefSeq_UMCU' + ALIAS: 'Annotation' + PROTOCOL: 'ncbiRefSeq' + VERSION: '_UMCU' + AVAILABLE: 'yes' + REQUIRED: 'yes' + COMMENT: "100519" + OPERATION: 'g' + HGVS: 'yes' + SPLICING: '6' + EXONSPLIC: 'yes' + - NAME: 'avsnp150' + ALIAS: 'dbSNP' + PROTOCOL: 'avsnp' + VERSION: '150' + AVAILABLE: 'yes' + REQUIRED: 'yes' + OPERATION: 'f' + COLSWANTED: '1' + - NAME: 'clinvar_20180603' + ALIAS: 'N/A' + PROTOCOL: 'clinvar' + VERSION: '_20180603' + AVAILABLE: 'yes' + REQUIRED: 'yes' + OPERATION: 'f' + COLSWANTED: '5' + - NAME: 'class100519' + ALIAS: 'Class' + PROTOCOL: 'class' + VERSION: '100519' + AVAILABLE: 'yes' + REQUIRED: 'yes' + OPERATION: 'f' + COLSWANTED: '1' |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 0348637001560173633/annovar_yaml/YAML_arguments_annovar.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0348637001560173633/annovar_yaml/YAML_arguments_annovar.yml Mon Jun 10 09:34:27 2019 -0400 |
b |
@@ -0,0 +1,117 @@ +GENERAL: + - APPLICATION: 'annovar' + PATHSCRIPTS: '/hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' + CODING_ANNOVAR: 'coding_annovar.pl ' + TABLE_ANNOVAR: 'table_annovar.pl ' + LOCATION_DATABASE: ' /hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' + DOT2UNDERLINE: + yes: '--dot2underline ' + no: '' + NASTRING: '--nastring . ' + OTHERINFO: + yes: '--otherinfo ' + no: '' + POLISH: + yes: '--polish ' + no: '' + REMOVE: + yes: '--remove ' + no: '' + THREAD: '--thread 8 ' + INPUTFORMAT: + vcfinput: '--vcfinput ' + SPECIES: + human: 'humandb ' + mouse: 'mousedb ' + BUILD: '--buildver hg19 ' +ANALYSIS: + DATABASES: + - NAME: 'cosmic84' + ALIAS: 'N/A' + PROTOCOL: 'cosmic' + VERSION: '84' + COMMENT: '20190221' + AVAILABLE: + yes: '1' + no: '0' + REQUIRED: + yes: '1' + no: '0' + OPERATION: 'f' + COLSWANTED: '--colswanted 4 ' + - NAME: 'refgene19' + ALIAS: 'N/A' + PROTOCOL: 'refgene' + VERSION: '19' + COMMENT: '20190210' + AVAILABLE: + yes: '1' + no: '0' + REQUIRED: + yes: '1' + no: '0' + OPERATION: 'g' + HGVS: + yes: '--hgvs ' + no: '' + SPLICING: '--splicing 6 ' + EXONSPLIC: + yes: '--exonicsplicing ' + no: '' + - NAME: 'ncbiRefSeq_UMCU' + ALIAS: 'Annotation' + PROTOCOL: 'ncbiRefSeq' + VERSION: '_UMCU' + AVAILABLE: + yes: '1' + no: '0' + REQUIRED: + yes: '1' + no: '0' + COMMENT: "100519" + OPERATION: 'g' + HGVS: + yes: '--hgvs ' + no: '' + SPLICING: '--splicing 6 ' + EXONSPLIC: + yes: '--exonicsplicing ' + no: '' + - NAME: 'avsnp150' + ALIAS: 'dbSNP' + PROTOCOL: 'avsnp' + VERSION: '150' + AVAILABLE: + yes: '1' + no: '0' + REQUIRED: + yes: '1' + no: '0' + OPERATION: 'f' + COLSWANTED: '--colswanted 1 ' + - NAME: 'clinvar_20180603' + ALIAS: 'N/A' + PROTOCOL: 'clinvar' + VERSION: '_20180603' + COMMENT: 'blah' + AVAILABLE: + yes: '1' + no: '0' + REQUIRED: + yes: '1' + no: '0' + OPERATION: 'f' + COLSWANTED: '--colswanted 5 ' + - NAME: 'class100519' + ALIAS: 'Class' + PROTOCOL: 'class' + VERSION: '100519' + AVAILABLE: + yes: '1' + no: '0' + REQUIRED: + yes: '1' + no: '0' + OPERATION: 'f' + COLSWANTED: '--colswanted 1 ' + |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 0348637001560173633/annovar_yaml/annovar_yaml.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0348637001560173633/annovar_yaml/annovar_yaml.pl Mon Jun 10 09:34:27 2019 -0400 |
[ |
b'@@ -0,0 +1,1121 @@\n+#/usr/bin/perl\n+#This code is using v4 of the Run_Annovar_vx.pl script!\n+\n+##################\n+#!!TEST COMMAND!!#\n+##################\n+#Following input required, input fixed currently to run limited Annovar settings\n+#perl annovar_yaml.pl --inyml YAML_annovar.yml --invcf invcf.vcf --outvcf outvcf.vcf > log.txt\n+\n+#Future prospects: ability to learn to read YAML files to pick up parameters. Manual definition of command line still required!\n+\n+#perl modules use\n+use YAML;\n+use YAML::Tiny;\n+use YAML::XS \'LoadFile\';\n+use Data::Dumper;\n+#use Data::YAML::Writer;\n+use Getopt::Long;\n+use feature qw(postderef postderef_qq);\n+use feature qw(refaliasing);\n+#no warnings qw(experimental::postderef);\n+use strict;\n+\n+#input required\n+#two modes run and edit\n+#Basis Yaml file [default required]\n+#Yaml out file [required in edit mode]\n+#species [default required]\n+#build [default required]\n+#protocol [default required]\n+#protocolversion [default required]\n+\n+#basic paramters\n+#Switch to enable disable Aliasses; enable=1 disable=0\n+my $use_alias = "1";\n+my $edit = "0";\n+my $run = "0";\n+my $application = "0";\n+#arguments yaml file is fixed!\n+#my $paryml = "YAML_arguments_annovar.yml";\n+my $paryml;\n+my $inyml;\n+my $outyml;\n+my $invcf;\n+my $outvcf;\n+my $yml_hash_arguments;\n+my %yml_hash_arguments;\n+my $yml_hash;\n+my %yml_hash;\n+my $yml_hash_edit;\n+my %yml_hash_edit;\n+my $in;\n+my $in2;\n+my %in;\n+my %in2;\n+my $writer;\n+my $lookup;\n+my $data_type;\n+\n+#parameter applications\n+my %annovarparameters_array;\n+my %annovarparameters_single;\n+my $annovarparameters_array;\n+my $annovarparameters_single;\n+\n+#Strings used as input parameters\n+#my $input_general_location_database;\n+#my $input_general_dir_scripts;\n+#my $input_general_location_scripts_coding_annovar;\n+#my $input_general_location_scripts_table_annovar;\n+my $input_annovar_build;\n+my $input_annovar_species;\n+my $inprotocol;\n+my $inprotocolversion;\n+my @inprotocol;\n+my @inprotocolversion;\n+\n+my $input_general_settings_dot2underline;\n+my $input_general_settings_nastring;\n+my $input_general_settings_otherinfo;\n+my $input_general_settings_polish;\n+my $input_general_settings_remove;\n+my $input_general_settings_thread;\n+my $input_general_settings_inputformat;\n+\n+my $input_databases_available;\n+my $input_databases_required;\n+\n+my $input_databases_colswanted;\n+my $input_databases_exonicsplic;\n+my $input_databases_hgvs;\n+my $input_databases_operation;\n+my $input_databases_splicing;\n+my @input_databases_colswanted;\n+my @input_databases_exonicsplic;\n+my @input_databases_hgvs;\n+my @input_databases_operation;\n+my @input_databases_splicing;\n+\n+#other variables\n+my $script;\n+my $type;\n+my $count;\n+my $column_build;\n+my $column_species;\n+my @column_build;\n+my @column_species;\n+my $pattern;\n+my $pattern2;\n+my $match;\n+my $match_value;\n+my @match_value;\n+my @readonly;\n+my %editinyml;\n+my $folder_symlinks = \'0\';\n+my $path_symlinks;\n+my @softlink_building_blocks;\n+\n+#Fixed values for searching hashes\n+my $level5 = "DATABASES";\n+\n+#parameters to build command\n+my $protocol;\n+my @protocol;\n+my $operation;\n+my $argument;\n+\n+GetOptions (\n+\t#Required input\n+\t\'protocol=s\' => \\$inprotocol,\n+\t\'protocolversion=s\' => \\$inprotocolversion,\n+\t\'script=s\' => \\$script,\n+\t\'invcf=s\' => \\$invcf,\n+\t\'outvcf=s\' => \\$outvcf,\n+ \'paryml=s\' => \\$paryml,\n+\t\'application=s\' => \\$application,\n+ \'inyml=s\' => \\$inyml,\n+ \'outyml=s\' => \\$outyml,\n+ \'build=s\' => \\$input_annovar_build,\n+ \'species=s\' => \\$input_annovar_species,\n+\t#Optional input\n+\t\'edit\' => \\$edit,\n+\t\'run\' => \\$run,\n+\t#variables in GENERAL\n+\t\'dot2underline=s\' => \\$input_general_settings_dot2underline,\n+\t\'nastring=s\' => \\$input_general_settings_nastring,\n+\t\'otherinfo=s\' => \\$input_general_settings_otherinfo,\n+\t\'polish=s\' => \\$input_general_settings_polish,\n+\t\'remove=s\' => \\$input_general_settings_remove,\n+\t\'thread=s\' => \\$input_general_settings_thread,\n+\t\'inputformat=s\' => \\$input_general_settings_inputformat,\n+\t#var'..b'##############################\n+\n+sub parse_lookup {\n+\n+my $hash;\n+my %hash;\n+my $hash_a;\n+my %hash_a;\n+my %hash_a2;\n+my $hash_a2;\n+my @inyml;\n+my @inarguments;\n+my $count;\n+my $match;\n+my $match2;\n+my $argument;\n+my ($pattern1, $pattern2, $pattern3, $pattern4, $pattern5);\n+\n+if ( $_[0] =~ /^parse1$/ ) {\n+$pattern1 = $_[1];\n+$pattern2 = $_[2];\n+$pattern3 = $_[3];\n+$pattern4 = $_[4];\n+@inyml = @{$yml_hash->{$pattern4}};\n+@inarguments = @{$yml_hash_arguments->{$pattern4}};\n+} elsif ( $_[0] =~ /^parse2$/) {\n+$pattern1 = $_[1];\n+$pattern2 = $_[2];\n+$pattern3 = $_[3];\n+$pattern4 = $_[4];\n+$pattern5 = $_[5];\n+@inyml = @{$yml_hash->{$pattern4}{$pattern5}};\n+@inarguments = @{$yml_hash_arguments->{$pattern4}{$pattern5}};\n+}\n+\n+$match = "0";\n+\n+foreach my $hash ( @inyml ) {\n+ $hash = \\%$hash;\n+ if ($hash->{$pattern3} =~ /^$pattern2$/ ) { \n+ my $value = $hash->{$pattern1};\n+ if ($value eq "" ) { \n+ print "Error unknown argument \\"$pattern1\\" for annotation database \\"$pattern2\\" in input YAML!\\n";\n+ exit;\n+ } \n+ foreach my $hash_a (@inarguments) {\n+ my $hash_a2 = $hash_a->{$pattern1};\n+ if ( $hash_a->{$pattern3} =~ /^$pattern2$/ ) {\n+ $match2++;\n+ if ($hash_a2 =~ /^HASH/ ) {\n+ $argument = $hash_a2->{$value};\n+ } else { \n+ $argument = $hash_a2;\n+ } \n+ if ($argument eq "" ) {\n+ print "Unknown given option \\"$value\\" for argument \\"$pattern1\\" in YAML arguments file or input YAML for database \\"$pattern2\\"!\\n";\n+\tprint "Please check your input and start the plugin again.\\n";\n+\texit;\n+ }\t\n+ }\n+ if ($match2 =~ /^1$/) { \n+ #Do nothing \n+ } elsif ( $match2 > 1 ) {\n+ print "Error Multiple matches for database \\"$pattern2\\" database in YAML argumentsfile.\\n";\n+\tprint "Please check your input and start the plugin again.\\n";\n+\texit;\n+ } elsif ( $match2 =~ /^0$/ ) {\n+ print "Error no matches for database \\"$pattern2\\" in YAML argumentsfile.\\n";\n+\tprint "Please check your input and start the plugin again.\\n";\n+\texit;\n+ } \n+ }\n+ $match++; \n+ $lookup = $argument; \n+ }\n+}\n+if ($match =~ /^1$/) {\n+ #Do nothing \n+} else {\n+ print "match: $match \\n";\n+ print "Error in yaml file multiple instances matching input yaml, please check input!\\n";\n+ exit;\n+}\n+\n+return $lookup;\n+\n+}\n+\n+#############\n+#Subroutine for opening out / edited yaml file\n+#############\n+sub openyml_write {\n+my $outyml = $in; \n+#Create second yml file with change values originating from cli\n+open(OUT, \'>\', "$outyml") or die "Could not open file \'$outyml\' $!";\n+print "Done creating output file...\\n";\n+}\n+\n+#############\n+#Subroutine to check whether yaml file exists\n+#############\n+sub openyml_read { \n+$in = $_[0];\n+chomp $in;\n+my $inyml = $in;\n+open(FILE, \'<\', "$inyml") or die "Could not open file \'$inyml\' $!";\n+close FILE;\n+print "Done reading\\n";\n+}\n+\n+#############\n+#Subroutine for reading argument yaml file in hash\n+##############\n+sub load_arguments {\n+$in = $_[0];\n+$yml_hash_arguments = LoadFile($in);\n+return($yml_hash_arguments, %yml_hash_arguments);\n+}\n+\n+#############\n+#Subroutine for reading input yaml file in hash\n+##############\n+sub load {\n+$in = $_[0];\n+$yml_hash = LoadFile($in);\n+return($yml_hash, %yml_hash);\n+}\n+\n+#############\n+#Subroutine for reading edited input yml file in hash\n+##############\n+sub load_edit {\n+$in = $_[0];\n+$yml_hash_edit = LoadFile($in);\n+}\n+\n+#############\n+#Subroutine for editing content yaml hash\n+##############\n+sub writeyml {\n+my $yml_hash = $in;\n+$writer = sub {\n+ my $line = shift;\n+ print FILE "$line\\n";\n+};\n+my $file = Data::YAML::Writer->new;\n+$file->write( $yml_hash, $writer );\n+}\n+\n+#############\n+#Subroutine for editing content edited yaml hash\n+##############\n+sub writeyml_edit {\n+my $yml_hash = $in;\n+$writer = sub {\n+ my $line = shift;\n+ print OUT "$line\\n";\n+};\n+my $file = Data::YAML::Writer->new;\n+$file->write( $yml_hash_edit, $writer );\n+close OUT;\n+}\n' |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 0348637001560173633/annovar_yaml/annovar_yaml.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0348637001560173633/annovar_yaml/annovar_yaml.xml Mon Jun 10 09:34:27 2019 -0400 |
[ |
@@ -0,0 +1,25 @@ +<tool id="annovar_yaml" name="Annovar YAML" version="1.0"> + <requirements> + <requirement type="package" version="1.29">perl-yaml</requirement> + <requirement type="package" version="1.73">perl-yaml-tiny</requirement> + <requirement type="package" version="0.74">perl-yaml-xs</requirement> + <requirement type="package" version="2.173">perl-data-dumper</requirement> + <requirement type="package" version="2.50">perl-getopt-long</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + perl $__tool_directory__/annovar_yaml.pl --paryml /data/annovar/YAML_arguments_annovar.yml --invcf $vcf --inyml $yaml --outvcf $output + ]]></command> + + <inputs> + + <param type="data" name="yaml" format="txt" /> + <param type="data" name="vcf" format="vcf" /> + + </inputs> + <outputs> + <data name="output" format="vcf"/> + </outputs> + <help><![CDATA[ + TODO: Fill in help for Annovar YAML tool. Added paryml + ]]></help> +</tool> |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 annovar_yaml/YAML_annovar.yml --- a/annovar_yaml/YAML_annovar.yml Mon Jun 10 09:21:03 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,72 +0,0 @@ -GENERAL: - - APPLICATION: 'annovar' - PATHSCRIPTS: '/hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' - CODING_ANNOVAR: 'coding_annovar.pl' - TABLE_ANNOVAR: 'table_annovar.pl' - LOCATION_DATABASE: ' /hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' - DOT2UNDERLINE: 'yes' - NASTRING: '.' - OTHERINFO: 'yes' - POLISH: 'yes' - REMOVE: 'yes' - THREAD: '8' - INPUTFORMAT: 'vcfinput' - SPECIES: 'human' - BUILD: 'hg19' -ANALYSIS: - DATABASES: - - NAME: 'cosmic84' - ALIAS: 'N/A' - PROTOCOL: 'cosmic' - VERSION: '84' - COMMENT: '20190221' - AVAILABLE: 'yes' - REQUIRED: 'yes' - OPERATION: 'f' - COLSWANTED: '4' - - NAME: 'refgene19' - ALIAS: 'N/A' - PROTOCOL: 'refgene' - VERSION: '19' - AVAILABLE: 'yes' - REQUIRED: 'yes' - COMMENT: '20190210' - OPERATION: 'g' - HGVS: 'yes' - SPLICING: '6' - EXONSPLIC: 'yes' - - NAME: 'ncbiRefSeq_UMCU' - ALIAS: 'Annotation' - PROTOCOL: 'ncbiRefSeq' - VERSION: '_UMCU' - AVAILABLE: 'yes' - REQUIRED: 'yes' - COMMENT: "100519" - OPERATION: 'g' - HGVS: 'yes' - SPLICING: '6' - EXONSPLIC: 'yes' - - NAME: 'avsnp150' - ALIAS: 'dbSNP' - PROTOCOL: 'avsnp' - VERSION: '150' - AVAILABLE: 'yes' - REQUIRED: 'yes' - OPERATION: 'f' - COLSWANTED: '1' - - NAME: 'clinvar_20180603' - ALIAS: 'N/A' - PROTOCOL: 'clinvar' - VERSION: '_20180603' - AVAILABLE: 'yes' - REQUIRED: 'yes' - OPERATION: 'f' - COLSWANTED: '5' - - NAME: 'class100519' - ALIAS: 'Class' - PROTOCOL: 'class' - VERSION: '100519' - AVAILABLE: 'yes' - REQUIRED: 'yes' - OPERATION: 'f' - COLSWANTED: '1' |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 annovar_yaml/YAML_arguments_annovar.yml --- a/annovar_yaml/YAML_arguments_annovar.yml Mon Jun 10 09:21:03 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,117 +0,0 @@ -GENERAL: - - APPLICATION: 'annovar' - PATHSCRIPTS: '/hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' - CODING_ANNOVAR: 'coding_annovar.pl ' - TABLE_ANNOVAR: 'table_annovar.pl ' - LOCATION_DATABASE: ' /hpc/cog_bioinf/pathologie/users/snouwens/Annovar_Moldia/Annovar/' - DOT2UNDERLINE: - yes: '--dot2underline ' - no: '' - NASTRING: '--nastring . ' - OTHERINFO: - yes: '--otherinfo ' - no: '' - POLISH: - yes: '--polish ' - no: '' - REMOVE: - yes: '--remove ' - no: '' - THREAD: '--thread 8 ' - INPUTFORMAT: - vcfinput: '--vcfinput ' - SPECIES: - human: 'humandb ' - mouse: 'mousedb ' - BUILD: '--buildver hg19 ' -ANALYSIS: - DATABASES: - - NAME: 'cosmic84' - ALIAS: 'N/A' - PROTOCOL: 'cosmic' - VERSION: '84' - COMMENT: '20190221' - AVAILABLE: - yes: '1' - no: '0' - REQUIRED: - yes: '1' - no: '0' - OPERATION: 'f' - COLSWANTED: '--colswanted 4 ' - - NAME: 'refgene19' - ALIAS: 'N/A' - PROTOCOL: 'refgene' - VERSION: '19' - COMMENT: '20190210' - AVAILABLE: - yes: '1' - no: '0' - REQUIRED: - yes: '1' - no: '0' - OPERATION: 'g' - HGVS: - yes: '--hgvs ' - no: '' - SPLICING: '--splicing 6 ' - EXONSPLIC: - yes: '--exonicsplicing ' - no: '' - - NAME: 'ncbiRefSeq_UMCU' - ALIAS: 'Annotation' - PROTOCOL: 'ncbiRefSeq' - VERSION: '_UMCU' - AVAILABLE: - yes: '1' - no: '0' - REQUIRED: - yes: '1' - no: '0' - COMMENT: "100519" - OPERATION: 'g' - HGVS: - yes: '--hgvs ' - no: '' - SPLICING: '--splicing 6 ' - EXONSPLIC: - yes: '--exonicsplicing ' - no: '' - - NAME: 'avsnp150' - ALIAS: 'dbSNP' - PROTOCOL: 'avsnp' - VERSION: '150' - AVAILABLE: - yes: '1' - no: '0' - REQUIRED: - yes: '1' - no: '0' - OPERATION: 'f' - COLSWANTED: '--colswanted 1 ' - - NAME: 'clinvar_20180603' - ALIAS: 'N/A' - PROTOCOL: 'clinvar' - VERSION: '_20180603' - COMMENT: 'blah' - AVAILABLE: - yes: '1' - no: '0' - REQUIRED: - yes: '1' - no: '0' - OPERATION: 'f' - COLSWANTED: '--colswanted 5 ' - - NAME: 'class100519' - ALIAS: 'Class' - PROTOCOL: 'class' - VERSION: '100519' - AVAILABLE: - yes: '1' - no: '0' - REQUIRED: - yes: '1' - no: '0' - OPERATION: 'f' - COLSWANTED: '--colswanted 1 ' - |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 annovar_yaml/annovar_yaml.pl --- a/annovar_yaml/annovar_yaml.pl Mon Jun 10 09:21:03 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,1121 +0,0 @@\n-#/usr/bin/perl\n-#This code is using v4 of the Run_Annovar_vx.pl script!\n-\n-##################\n-#!!TEST COMMAND!!#\n-##################\n-#Following input required, input fixed currently to run limited Annovar settings\n-#perl annovar_yaml.pl --inyml YAML_annovar.yml --invcf invcf.vcf --outvcf outvcf.vcf > log.txt\n-\n-#Future prospects: ability to learn to read YAML files to pick up parameters. Manual definition of command line still required!\n-\n-#perl modules use\n-use YAML;\n-use YAML::Tiny;\n-use YAML::XS \'LoadFile\';\n-use Data::Dumper;\n-#use Data::YAML::Writer;\n-use Getopt::Long;\n-use feature qw(postderef postderef_qq);\n-use feature qw(refaliasing);\n-#no warnings qw(experimental::postderef);\n-use strict;\n-\n-#input required\n-#two modes run and edit\n-#Basis Yaml file [default required]\n-#Yaml out file [required in edit mode]\n-#species [default required]\n-#build [default required]\n-#protocol [default required]\n-#protocolversion [default required]\n-\n-#basic paramters\n-#Switch to enable disable Aliasses; enable=1 disable=0\n-my $use_alias = "1";\n-my $edit = "0";\n-my $run = "0";\n-my $application = "0";\n-#arguments yaml file is fixed!\n-#my $paryml = "YAML_arguments_annovar.yml";\n-my $paryml;\n-my $inyml;\n-my $outyml;\n-my $invcf;\n-my $outvcf;\n-my $yml_hash_arguments;\n-my %yml_hash_arguments;\n-my $yml_hash;\n-my %yml_hash;\n-my $yml_hash_edit;\n-my %yml_hash_edit;\n-my $in;\n-my $in2;\n-my %in;\n-my %in2;\n-my $writer;\n-my $lookup;\n-my $data_type;\n-\n-#parameter applications\n-my %annovarparameters_array;\n-my %annovarparameters_single;\n-my $annovarparameters_array;\n-my $annovarparameters_single;\n-\n-#Strings used as input parameters\n-#my $input_general_location_database;\n-#my $input_general_dir_scripts;\n-#my $input_general_location_scripts_coding_annovar;\n-#my $input_general_location_scripts_table_annovar;\n-my $input_annovar_build;\n-my $input_annovar_species;\n-my $inprotocol;\n-my $inprotocolversion;\n-my @inprotocol;\n-my @inprotocolversion;\n-\n-my $input_general_settings_dot2underline;\n-my $input_general_settings_nastring;\n-my $input_general_settings_otherinfo;\n-my $input_general_settings_polish;\n-my $input_general_settings_remove;\n-my $input_general_settings_thread;\n-my $input_general_settings_inputformat;\n-\n-my $input_databases_available;\n-my $input_databases_required;\n-\n-my $input_databases_colswanted;\n-my $input_databases_exonicsplic;\n-my $input_databases_hgvs;\n-my $input_databases_operation;\n-my $input_databases_splicing;\n-my @input_databases_colswanted;\n-my @input_databases_exonicsplic;\n-my @input_databases_hgvs;\n-my @input_databases_operation;\n-my @input_databases_splicing;\n-\n-#other variables\n-my $script;\n-my $type;\n-my $count;\n-my $column_build;\n-my $column_species;\n-my @column_build;\n-my @column_species;\n-my $pattern;\n-my $pattern2;\n-my $match;\n-my $match_value;\n-my @match_value;\n-my @readonly;\n-my %editinyml;\n-my $folder_symlinks = \'0\';\n-my $path_symlinks;\n-my @softlink_building_blocks;\n-\n-#Fixed values for searching hashes\n-my $level5 = "DATABASES";\n-\n-#parameters to build command\n-my $protocol;\n-my @protocol;\n-my $operation;\n-my $argument;\n-\n-GetOptions (\n-\t#Required input\n-\t\'protocol=s\' => \\$inprotocol,\n-\t\'protocolversion=s\' => \\$inprotocolversion,\n-\t\'script=s\' => \\$script,\n-\t\'invcf=s\' => \\$invcf,\n-\t\'outvcf=s\' => \\$outvcf,\n- \'paryml=s\' => \\$paryml,\n-\t\'application=s\' => \\$application,\n- \'inyml=s\' => \\$inyml,\n- \'outyml=s\' => \\$outyml,\n- \'build=s\' => \\$input_annovar_build,\n- \'species=s\' => \\$input_annovar_species,\n-\t#Optional input\n-\t\'edit\' => \\$edit,\n-\t\'run\' => \\$run,\n-\t#variables in GENERAL\n-\t\'dot2underline=s\' => \\$input_general_settings_dot2underline,\n-\t\'nastring=s\' => \\$input_general_settings_nastring,\n-\t\'otherinfo=s\' => \\$input_general_settings_otherinfo,\n-\t\'polish=s\' => \\$input_general_settings_polish,\n-\t\'remove=s\' => \\$input_general_settings_remove,\n-\t\'thread=s\' => \\$input_general_settings_thread,\n-\t\'inputformat=s\' => \\$input_general_settings_inputformat,\n-\t#var'..b'##############################\n-\n-sub parse_lookup {\n-\n-my $hash;\n-my %hash;\n-my $hash_a;\n-my %hash_a;\n-my %hash_a2;\n-my $hash_a2;\n-my @inyml;\n-my @inarguments;\n-my $count;\n-my $match;\n-my $match2;\n-my $argument;\n-my ($pattern1, $pattern2, $pattern3, $pattern4, $pattern5);\n-\n-if ( $_[0] =~ /^parse1$/ ) {\n-$pattern1 = $_[1];\n-$pattern2 = $_[2];\n-$pattern3 = $_[3];\n-$pattern4 = $_[4];\n-@inyml = @{$yml_hash->{$pattern4}};\n-@inarguments = @{$yml_hash_arguments->{$pattern4}};\n-} elsif ( $_[0] =~ /^parse2$/) {\n-$pattern1 = $_[1];\n-$pattern2 = $_[2];\n-$pattern3 = $_[3];\n-$pattern4 = $_[4];\n-$pattern5 = $_[5];\n-@inyml = @{$yml_hash->{$pattern4}{$pattern5}};\n-@inarguments = @{$yml_hash_arguments->{$pattern4}{$pattern5}};\n-}\n-\n-$match = "0";\n-\n-foreach my $hash ( @inyml ) {\n- $hash = \\%$hash;\n- if ($hash->{$pattern3} =~ /^$pattern2$/ ) { \n- my $value = $hash->{$pattern1};\n- if ($value eq "" ) { \n- print "Error unknown argument \\"$pattern1\\" for annotation database \\"$pattern2\\" in input YAML!\\n";\n- exit;\n- } \n- foreach my $hash_a (@inarguments) {\n- my $hash_a2 = $hash_a->{$pattern1};\n- if ( $hash_a->{$pattern3} =~ /^$pattern2$/ ) {\n- $match2++;\n- if ($hash_a2 =~ /^HASH/ ) {\n- $argument = $hash_a2->{$value};\n- } else { \n- $argument = $hash_a2;\n- } \n- if ($argument eq "" ) {\n- print "Unknown given option \\"$value\\" for argument \\"$pattern1\\" in YAML arguments file or input YAML for database \\"$pattern2\\"!\\n";\n-\tprint "Please check your input and start the plugin again.\\n";\n-\texit;\n- }\t\n- }\n- if ($match2 =~ /^1$/) { \n- #Do nothing \n- } elsif ( $match2 > 1 ) {\n- print "Error Multiple matches for database \\"$pattern2\\" database in YAML argumentsfile.\\n";\n-\tprint "Please check your input and start the plugin again.\\n";\n-\texit;\n- } elsif ( $match2 =~ /^0$/ ) {\n- print "Error no matches for database \\"$pattern2\\" in YAML argumentsfile.\\n";\n-\tprint "Please check your input and start the plugin again.\\n";\n-\texit;\n- } \n- }\n- $match++; \n- $lookup = $argument; \n- }\n-}\n-if ($match =~ /^1$/) {\n- #Do nothing \n-} else {\n- print "match: $match \\n";\n- print "Error in yaml file multiple instances matching input yaml, please check input!\\n";\n- exit;\n-}\n-\n-return $lookup;\n-\n-}\n-\n-#############\n-#Subroutine for opening out / edited yaml file\n-#############\n-sub openyml_write {\n-my $outyml = $in; \n-#Create second yml file with change values originating from cli\n-open(OUT, \'>\', "$outyml") or die "Could not open file \'$outyml\' $!";\n-print "Done creating output file...\\n";\n-}\n-\n-#############\n-#Subroutine to check whether yaml file exists\n-#############\n-sub openyml_read { \n-$in = $_[0];\n-chomp $in;\n-my $inyml = $in;\n-open(FILE, \'<\', "$inyml") or die "Could not open file \'$inyml\' $!";\n-close FILE;\n-print "Done reading\\n";\n-}\n-\n-#############\n-#Subroutine for reading argument yaml file in hash\n-##############\n-sub load_arguments {\n-$in = $_[0];\n-$yml_hash_arguments = LoadFile($in);\n-return($yml_hash_arguments, %yml_hash_arguments);\n-}\n-\n-#############\n-#Subroutine for reading input yaml file in hash\n-##############\n-sub load {\n-$in = $_[0];\n-$yml_hash = LoadFile($in);\n-return($yml_hash, %yml_hash);\n-}\n-\n-#############\n-#Subroutine for reading edited input yml file in hash\n-##############\n-sub load_edit {\n-$in = $_[0];\n-$yml_hash_edit = LoadFile($in);\n-}\n-\n-#############\n-#Subroutine for editing content yaml hash\n-##############\n-sub writeyml {\n-my $yml_hash = $in;\n-$writer = sub {\n- my $line = shift;\n- print FILE "$line\\n";\n-};\n-my $file = Data::YAML::Writer->new;\n-$file->write( $yml_hash, $writer );\n-}\n-\n-#############\n-#Subroutine for editing content edited yaml hash\n-##############\n-sub writeyml_edit {\n-my $yml_hash = $in;\n-$writer = sub {\n- my $line = shift;\n- print OUT "$line\\n";\n-};\n-my $file = Data::YAML::Writer->new;\n-$file->write( $yml_hash_edit, $writer );\n-close OUT;\n-}\n' |
b |
diff -r 0044b989f60f -r 237d0eef2ad3 annovar_yaml/annovar_yaml.xml --- a/annovar_yaml/annovar_yaml.xml Mon Jun 10 09:21:03 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
@@ -1,25 +0,0 @@ -<tool id="annovar_yaml" name="Annovar YAML" version="1.0"> - <requirements> - <requirement type="package" version="1.29">perl-yaml</requirement> - <requirement type="package" version="1.73">perl-yaml-tiny</requirement> - <requirement type="package" version="0.74">perl-yaml-xs</requirement> - <requirement type="package" version="2.173">perl-data-dumper</requirement> - <requirement type="package" version="2.50">perl-getopt-long</requirement> - </requirements> - <command detect_errors="exit_code"><![CDATA[ - perl $__tool_directory__/annovar_yaml.pl --invcf $vcf --inyml $yaml --outvcf $output - ]]></command> - - <inputs> - - <param type="data" name="yaml" format="txt" /> - <param type="data" name="vcf" format="vcf" /> - - </inputs> - <outputs> - <data name="output" format="vcf"/> - </outputs> - <help><![CDATA[ - TODO: Fill in help for Annovar YAML tool. - ]]></help> -</tool> |