<commit_before>#!/usr/bin/perl
use strict;
use warnings;
### script that takes in .vcf file and produces a .var file. Filters and combines the mutation data in .vcf file with data from 2 genome coordinate files (with headers) #####(one for coding ###regions and one for non coding regions) to add functional data. Also requires h37rv.fasta file (there reference genome sequence file) and ###get_seq_coord.pl script to exist ###in the same folder

### example command ./flatAnnotatorVAR.pl test.vcf qual{0-255} hetero{0-1} platypusfilter{PASS|ALL} (output will be test.var) 
use FindBin qw($Bin);
use SeqCoord;

$/="\n";
$,="\t";
$\="\n";
my %tt11;
&create_translation_table11(\%tt11);

my $reference = "h37rv"; #this may need to be changed in the future
my $ref_file = shift @ARGV; # ${h37rv}.fasta
my $Creference = shift @ARGV; # ${h37rv_coding}.txt
my $Nreference = shift @ARGV; # ${h37rv_noncoding}.txt
my $snpfile = shift @ARGV; # ${file}.vcf
#my $refPath= shift @ARGV;
my $qualThresh = (shift@ARGV)||0; # 15
my $heteroThresh = (shift@ARGV)||0; # 0.1
my $platypusFilter = (shift@ARGV)||'PASS'; # PASS
if ($platypusFilter =~ m/pass/i) {
  $platypusFilter = 'PASS'; #NOTE: can include '|badReads|alleleBias' if using stampy/platypus pipeline as calls are conservative
} else {
  #$platypusFilter =~ s/\-/\|/g;<commit_msg>Allow use of SeqCoord.pm from script dir<commit_after>#!/usr/bin/perl
use strict;
use warnings;
### script that takes in .vcf file and produces a .var file. Filters and combines the mutation data in .vcf file with data from 2 genome coordinate files (with headers) #####(one for coding ###regions and one for non coding regions) to add functional data. Also requires h37rv.fasta file (there reference genome sequence file) and ###get_seq_coord.pl script to exist ###in the same folder

### example command ./flatAnnotatorVAR.pl test.vcf qual{0-255} hetero{0-1} platypusfilter{PASS|ALL} (output will be test.var) 
use Cwd qw(abs_path);
use FindBin qw($Bin);
use lib abs_path($Bin);
use SeqCoord;

$/="\n";
$,="\t";
$\="\n";
my %tt11;
&create_translation_table11(\%tt11);

my $reference = "h37rv"; #this may need to be changed in the future
my $ref_file = shift @ARGV; # ${h37rv}.fasta
my $Creference = shift @ARGV; # ${h37rv_coding}.txt
my $Nreference = shift @ARGV; # ${h37rv_noncoding}.txt
my $snpfile = shift @ARGV; # ${file}.vcf
#my $refPath= shift @ARGV;
my $qualThresh = (shift@ARGV)||0; # 15
my $heteroThresh = (shift@ARGV)||0; # 0.1
my $platypusFilter = (shift@ARGV)||'PASS'; # PASS
if ($platypusFilter =~ m/pass/i) {
  $platypusFilter = 'PASS'; #NOTE: can include '|badReads|alleleBias' if using stampy/platypus pipeline as calls are conservative
} else {
  #$platypusFilter =~ s/\-/\|/g;
{'fraction_non_alphanumeric': 0.15299742552408974, 'fraction_numerical': 0.021331371827877896, 'mean_word_length': 4.913043478260869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7361676', 'n_tokens_mistral': 1025, 'n_tokens_neox': 971, 'n_words': 323}