sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
9ae0c326b9301fc2a0fb74e531a6cb69972f4e0ee4b751f647dac75f0e070ab1
Perl
211
17
#!/usr/bin/perl use strict; my @c; my $node = 0; while (<>) { chomp; @c = split; while ($#c >= 0) { my $w = shift @c; print $node." ".($node+1)." ".$w."\n"; $node++; } } print $node."\n";
3e25e7b691d5adbda4e4b0ab7c3f5a9ff3c82cd09f133fe6e8610e21c71ccfea
Perl
248
10
#!/usr/bin/env perl # This script just takes VCF without header from STDIN # and puts same VCF with REF and ALT swapped to STDOUT while (<>) { s/\tFail\(REF\=\=ALT\)//; @f = split; print join("\t", @f[0..2], @f[4,3], @f[5..9])."\n" }
b8380694e65597807896c5a8e8c7eb577c4894a4f429482a817fcffcecdbdd0d
Perl
255
19
#!/usr/bin/perl use strict; my @c; my $node = 0; print "#FSTBasic MaxPlus\nI 0\n"; while (<>) { chomp; @c = split; while ($#c >= 0) { my $w = shift @c; print "T ".$node." ".($node+1)." $w $w\n"; $node++; } } print "F ".$node."\n";
aa178cbe05ecad8d01188cae6fd60b205731809146ba6b5ef4be06aa55c475bf
Perl
324
22
#!/usr/bin/perl use strict; my @c; my $node = 0; print "#FSTBasic MaxPlus\nI 0\n"; while (<>) { chomp; s/^\s*//; s/\s*$//; @c = split(//); while ($#c >= 0) { my $w = shift @c; $w = "<w>" if ($w eq " "); print "T ".$node." ".($node+1)." ".$w." ".$w." 0\n"; $node++; } } print "F ".$node."\...
ba8fa09b7ccaf267828d107ab2570d6023ac37c0f0bb674ad75c43ac8302e996
Perl
353
26
#!/usr/bin/perl open(A, $ARGV[0]) or die("could not open"); open(B, $ARGV[1]) or die("could not open"); @a = <A>; @b = <B>; close(A); close(B); die("length mismatch") if ($#a != $#b); $max = 0; for $i (0..$#a) { $diff = abs($a[i] - $b[i]); if ($diff > $max) { $max = $diff; } } print "$#a lin...
ff02c7bfa6400609c65f724c1fe1732d78a45c972ca5673acae37768d41f3c7d
Perl
372
14
#!/usr/bin/env perl # Used in conjunction with get_rules.pl # example input line: XANTHE Z AE1 N DH # example output line: EHTNAX DH N AE1 Z while(<>){ @A = split(" ", $_); $word = shift @A; $word = join("", reverse(split("", $word))); # Reverse letters of word. @A = reverse(@A); # Reverse phones in pron. ...
9a35314b6105f149ae11de5a036056def154b1247d048b00012bc4fa444b3701
Perl
415
23
#!/usr/bin/perl use strict; my $in = $ARGV[0]; my $out = $ARGV[1]; open(IN,$in); open(OUT,">$out"); my $id = ""; my $n = 0; while(<IN>){ my $line = $_; $line =~s/\n//g;$line =~s/\r//g; if ($line =~/Sequence: (.*)$/){$id=$1;} elsif ($line =~/^(\d+) (\d+)/){ $n++; my @infos = split(/ /,$line); print OUT "$id...
7bfdd8d6468aa0a3611088cdec5bb9f763bdb19e3636d39d9984b3a7edb65b99
Perl
461
27
#!/usr/bin/perl use strict; use File::Basename; my $dirname = dirname(__FILE__); my $out = $ARGV[1]; my $in = $ARGV[0]; open(F,$in); open(O,">$out"); while(<F>){ if (/>(.*)/){ print O $_; } else{ my $dna = $_; my $DNA = uc($dna); $DNA =~s/\n//g;$DNA =~s/\r//g; system("perl $dirname/DNA_Transcription_Tr...
e30b5ab774c159959d1c76a1555c17164e3e7dd3740bd816ff3cf999c012745e
Perl
462
21
#!/usr/bin/env perl #Finds unique phones from the basic rules file use utf8; ($b)=$ARGV[0]; ($tmpdir)=$ARGV[1]; open(BB, "<", "$b/basic_rules") || die "Can't open basic rules"; open(O, ">$tmpdir/phones") || die "Can't open text file for writing"; binmode(O, ":utf8"); my %phones = qw(); while (<BB>) { chomp; my @s...
d0546b2b4eade8d0992faac2b3db61574d702834c6115306fc57556d88eb6e74
Perl
526
31
#!/usr/bin/perl print "#FSTBasic MaxPlus\n"; while (<>) { if (/start=(\d+)/) { $initial = $1; print "I $initial\n"; } if (/end=(\d+)/) { $final = $1; print "F $final\n"; } if (/^J=/) { $s = $1 if (/S=(\d+)/); $e = $1 if (/E=(\d+)/); $w = $1 if (/W=(\S+)/); $l = $1 if ...
fc416a656dc3dff6d67bc16f4bb9a25649094043e4380ff677ac26345c90649c
Perl
553
23
#!/usr/bin/perl # Fixes word boundary labels and removes unnecessary out labels. # The resulting FST should be optimized after this operation. while (<>) { if (/(T\s+\d+\s+\d+\s+)#\d+/) { # Word boundary input symbol if (!/#\d+\s+(\S+)/) { print STDERR "Invalid word boundary: $_"; exit 1; } ...
4ca823171528a8e9aec7264bcf73cec775628b8f261654e02233ce90e2c5bed3
Perl
555
19
#!/usr/bin/env perl # This program reads and writes either a dictionary or just a list # of words, and it removes any words containing ";" or "," as these # are used in these programs. It will warn about these. # It will die if the pronunciations have these symbols in. while(<>) { chop; @A = split(" ", $_); $w...
14e3d4bbbf32f4844d1dcb8275d62d2250a5ffeabe887b11c4fc187f05469dba
Perl
565
39
#!/usr/bin/perl use strict; use warnings; use File::Basename; # # # # # if ( @ARGV != 1 ) { print "\n"; print "\nremove entries from NORMAL samples"; print "\n\nusage: perl " . basename($0) . " [ INPUT_FILE ] "; print "\n\n"; exit (0); } my $INPUT_FILE = $ARGV[0]; my $line; open (FHI, "<" , $INPUT...
adf78975f8535b8204ca50f1176a4be86a6ae4d90912181cf42103de29129ef3
Perl
581
33
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University # Apache 2.0. # use strict; use warnings; use XML::Simple; use Data::Dumper; binmode STDOUT, ":utf8"; my %seen; while (my $keyword = <STDIN>) { chomp $keyword; $seen{$keyword} = 1; } my $data = XMLin($ARGV[0], ForceArray => 1); #print Dumper($data...
f297637b670fee7b69e73911a2c5b36d3ce0c5a945dafdfa77120316d099f133
Perl
582
33
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University # Apache 2.0. # use strict; use warnings; use XML::Simple; use Data::Dumper; binmode STDOUT, ":utf8"; my %seen; while (my $keyword = <STDIN>) { chomp $keyword; $seen{$keyword} = 1; } my $data = XMLin($ARGV[0], ForceArray => 1); #print Dumper($data...
06d00f8644e3884bb8df311ca2c0ee1fd040f1d878d19a37e8b1294f04749d2a
Perl
589
25
#!/usr/bin/env perl #Finds unique phones from the basic rules file # Copyright 2014 Gaurav Kumar. Apache 2.0 use utf8; ($b)=$ARGV[0]; ($tmpdir)=$ARGV[1]; open(BB, "<", "$b/basic_rules") || die "Can't open basic rules"; binmode(BB, ":iso88591"); open(O, ">$tmpdir/phones") || die "Can't open text file for writing"; ...
b92d4496dd1c961c47fb39d048107d4ce4ab51a00d9b739f9c1b3cb3e3394b31
Perl
611
35
#!/usr/bin/perl # Convert (triphone) phn to transcript use locale; use POSIX; my $cur_word = ""; while (<>) { my $l = ""; chomp; @c = split; if ($#c > 0) { if (!($c[2] =~ /[^\.]+\.(\d+)$/) || $1 == 0) { if ($c[2] =~ /.\-(.)\+./) { $l = $1; } else { $l = $c[2]; # Monophone ...
1018a0986685909e94e370f267811e858d417d352efbe5d2a31af6d1e9942cf5
Perl
615
41
#!/usr/bin/perl use strict; my $in = $ARGV[0]; my $out = $ARGV[1]; my $ref = $ARGV[2]; open(I,$in); open(O,">$out"); while(<I>){ if (!/^#/){ my $line = $_; $line =~s/\n//g;$line =~s/\r//g; my @infos = split(/\t/,$line); print O "ref"; for (my $i = 1; $i <= $#infos; $i++){ my $val = $infos[$i]; if ($...
8bc2102e4aaeef79ceeb7439740ac0e29c3687cda557cce9ebd2f1e386ef880e
Perl
638
33
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University # Apache 2.0. # use strict; use warnings; use XML::Simple; use Data::Dumper; binmode STDOUT, ":utf8"; my @keywords; while (my $line = <STDIN>) { chomp $line; push @keywords, $line; } #print "Will retain ", scalar(@keywords), " keywords\n"; my $data...
f15015ecc521dd5dd8ff2c3108d86a11f4f72d1a7f4a81766e60973b8e659897
Perl
643
33
#!/usr/bin/perl # Creates all paths needed for one type of files in training # Input: recipe-file recipe-key # Example: To create all paths needed for alignment files: # ./make_recipe_paths.pl train.recipe alignment use locale; use strict; use File::Path; my $recipe = shift; my $key = shift; my $fh; die "...
71eecf84f785ae74914ce6dfcb8e0ca95f53894ec5983f84300b9345f826d664
Perl
680
31
#!/usr/bin/env perl # Add counts to an oovlist. # Reads in counts as output by uniq -c, and # an oovlist, and prints out the counts of the oovlist. (@ARGV == 1 || @ARGV == 2) || die "Usage: add_counts.pl count_file [oovlist]\n"; $counts = shift @ARGV; open(C, "<$counts") || die "Opening counts file $counts"; whil...
ef2aabb6c164c28ae174b4e3489c6d120bfbd938859a1b5e0c337359931a182b
Perl
682
28
#!/usr/bin/env perl # This script takes VCF with header on the STDIN and filters out: # - chrM # - indels (Selene can't parse them currently) # - non-AGTC alleles (probably these are just Ns after conversion to hg19) # Filtered stuff goes to STDERR, good stuff to STDOUT, both headered while (<>) { if (not $x) { ...
55dbceb86fccea08a425bb8b76b1b0f3dcc58598c17c31ebd7666ac2db6bd100
Perl
705
32
#!/usr/bin/perl my $eps = ","; my @num_incoming = (); my @incoming_label = (); use Fsm; use strict; # Load FST my $fsm = Fsm->new; $fsm->read_fst(shift); # Find the word arcs and count incoming arcs my @word_arcs = (); for my $s (@{$fsm->{"V"}}) { # Iterate over each state for my $a (@$s) { # Iterate over each a...
7cb968c3d0878198e37ce9c0de3ef0ee7baadcd4408ce1b7931bac4553561a99
Perl
743
47
#!/usr/bin/perl while (<>) { chomp; if (/^\d+$/) { if ($final ne undef) { print STDERR "ERROR: multiple final states\n"; exit 1; } $final = $&; next; } if (!/^(\d+)\s+(\d+)\s+(\S+)\s*$/) { print STDERR "ERROR: weird line: $_\n"; exit 1; } $src = $1; $tgt = $2; $sym = ...
6ca4012f54be87a4dc0aeae0b4fd18593484e86d0d5d6539e0bcccfb69533216
Perl
751
48
#!/usr/bin/env perl # The test script is written in Perl. It runs the peak_match program to compare the output file with the expected peak coordinates. use strict; my $expected_result="K169N-HN M001N-HN E168N-HN T002N-HN V109N-HN R123N-HN S136N-HN K167N-HN E063N-HN K165N-HN D108N-HN Q061N-HN G060N-HN E049N-HN ...
a06b8589b720491ee7b7ed3c74e6dac7db53d869fc400742585b9762f41f8d6c
Perl
777
35
#!/usr/bin/perl # Usage: copy_recipe_files.pl RECIPE source-key target-key use locale; use strict; my $recipe_file = shift; my $source_key = shift; my $target_key = shift; die "Usage: copy_recipe_files.pl RECIPE source-key target-key" if (!defined($target_key)); open REC, "< $recipe_file" || die "Could not open $re...
7565b325ad7951ce75bd8a8a02028faddade05aa57bb929ed4266296191d8d25
Perl
823
25
#!/usr/bin/env perl use warnings; #sed replacement for -w perl parameter # Copyright Chao Weng # normalizations for hkust trascript # see the docs/trans-guidelines.pdf for details while (<STDIN>) { @A = split(" ", $_); print "$A[0] "; for ($n = 1; $n < @A; $n++) { $a = $A[$n]; if (($a eq "{breath}")||...
3662c14c32bd016a7c609451386f627a1074f849647745f13ba02e74ef887d8c
Perl
825
23
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
500b3413591c326586aa17b520e5d7ee3fe731c6671a448e0ee47d647c4da17c
Perl
831
51
#!/usr/bin/perl # Copyright 2020 Ivan Medennikov (STC-innovations Ltd) # Apache 2.0. # This script creates utt2uniq file for the CHiME-6 utterances. ($filein,$fileout)=@ARGV; open(fidout, ">$fileout") or die "can't open $fileout : $!"; open(fidin, "<$filein") or die "can't open $filein : $!"; while ($line=<fidi...
952312455ad0f7b7749556fc7b660949552e406c49f6b928c8a7d6d5840f965a
Perl
854
27
#!/usr/bin/env perl # If the command-line argument is 4, this script prints "0 1 2 3"; # If the command-line argument is 20, it prints 10 through 29. # These numbers are used to allocate the names of split-up data # directories. We make the names this way so that when we use globs # to represent filenames with these...
81c25f4c90b7a95d133df2f672e4e09ddcf733f506cf338fadca4a88e24b67de
Perl
857
28
#!/usr/bin/env perl # # If the command-line argument is 4, this script prints "0 1 2 3"; # If the command-line argument is 20, it prints 10 through 29. # These numbers are used to allocate the names of split-up data # directories. We make the names this way so that when we use globs # to represent filenames with th...
5870b6c7077ce33c9bbfbff4cb8e2828616dee55d52d937d8f199f833f878f20
Perl
875
45
#!/usr/bin/perl # Copyright 2020 Ivan Medennikov (STC-innovations Ltd) # Apache 2.0. # This script splits speakers in utt2spk file, # leaving $ups utterances for each sub-speaker. ($filein,$ups,$fileout)=@ARGV; open(fidin, "<$filein") or die "can't open $filein : $!"; open(fidout, ">$fileout") or die "can't op...
38552712b506f66740f273368527741cd16a974a500e6a0be5ce1628ec50b227
Perl
897
51
#!/usr/bin/perl use strict; use warnings; my $BLASTResult=$ARGV[0]; my $SEQFile=$ARGV[1]; my $coverage=$ARGV[2]; my $identity=$ARGV[3]*100;#percents my $score=$ARGV[4]; my %hash; my @row; my $line; #my $coverage=0.5; #my $identity=50;#percents #my $score=50; &ReadSeqLength("$SEQFile",\%hash); open(F,$BLASTResult);...
946c8bb1d95a9205fe729776b2d0128767703914f589493a03cacdcbce86c40e
Perl
919
50
#!/usr/bin/perl use strict; my $file = $ARGV[0]; my $out = $ARGV[1]; my %h; open(F,$file); while(<F>){ my @infos = split(/\t/,$_); if ($infos[2] eq 'CDS' && /Name=([^;]*);/){ my $id = $1; $h{$id}++; } } close(F); my %dup; foreach my $id(keys(%h)){ my $n = $h{$id}; if ($n > 1){ $dup{$id} = 1; } } open(O,...
2781ebdd36f2a84538185f7560f66dd57efe0021859900915a4270aa10ad44cd
Perl
920
28
#!/usr/bin/env perl # Copyright 2017 Vimal Manohar # Apache 2.0 @ARGV == 2 || die "usage: normalize_bn96_transcripts.pl noise_word spoken_noise_word < transcript > transcript2"; $noise_word = shift @ARGV; $spoken_noise_word = shift @ARGV; while(<STDIN>) { $_ =~ m:^(\S+) (.+): || die "bad line $_"; $utt = $...
3d0715ac5dcf1d0db6183fd72e7dd08a1cc343cd4c4845b49507899658b87f1d
Perl
1,002
39
#!/usr/bin/perl #require "Parse_Form.lib"; #&Parse_Form; require "./cgi-lib.pl"; my (%formdata, # The form data %cgi_cfn, # The uploaded file(s) client-provided name(s) %cgi_ct, # The uploaded file(s) content-type(s). These are # set by the user's browser and may be unreliable ...
b83f552cd508c59400bc6936b967a58381b96c4869efc8ad01bd4485c92361be
Perl
1,009
27
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
5f7e0a2039c803b1a3e01c59d737807408546f451fd1512177bfe6712fe14d02
Perl
1,047
46
#!/usr/bin/perl use Cwd; use File::Spec; use File::Basename; use strict; my @tools = ("git", "wget", "bzip2", "java", "tabix", "weka.jar"); my $tool_path = ''; my $foundTool; my $printHeader = 1; print "\n\nChecking dependencies for ISOWN ... \n\n"; my $cwd = dirname($0); foreach my $t (0 .. $#tools) { $foundT...
ff064aae5a3d52026db9c6fc2e04e61f1438760f9dab5644b34da180d03b6f1f
Perl
1,063
45
#!/usr/bin/perl # Parses the segmentation output of the decoder and saves segmentations # of different files to target directory in PHN format. New file # names are taken from 'LNA: ' line of the decoder output and use # .snseg suffix. use locale; die "Arguments: segmentation-file [target-directory]" if ($#ARGV < 0...
2fd597c463ef47fbbda11b53a99aecc2ae3659d1ec2455694cbb7d492f4dfff0
Perl
1,082
44
#!/usr/bin/env perl # This program takes the output of score_prons.pl and collates # it for each (rule, destress) pair so that we get the # counts of right/partial/wrong for each pair. # The input is a 7-tuple on each line, like: # word;pron;base-word;base-pron;rule-name;de-stress;right|partial|wrong # # The output f...
b881822f673a041042cc62bc2c3cd831788b3b5a2a748a0006c5fd6aecb4111d
Perl
1,107
62
#!/usr/bin/perl use strict; my $file = $ARGV[0]; my $metadata = $ARGV[1]; my %strains; open(F,$metadata); while(<F>){ my $line = $_; $line =~s/\n//g;$line =~s/\r//g; my ($path_genome,$strain) = split(/\t/,$line); $strains{$path_genome} = $strain; } close(F); my %ANIs; my %genomes; my %genome_names; my $num_lin...
b5a21fc579ef1334a2fbb13f1177a7a6e4dc65fc47596e5daba5d09082de2e1a
Perl
1,113
55
#!/usr/bin/env perl # The test script is written in Perl. It runs the fid program and phase program with a test input file and checks the output file for the expected phase correction values use strict; my $exe1 = "./fid -process full -nus none -out test.ft2 -di no -di-indirect no -phase-in none"; my $exe2 =...
30de878f80b11706ce370f046a03146bf5ea2a73fd4822f8e0f51db0eb3c9e05
Perl
1,132
62
#!/usr/bin/perl # updates the old .cfg file to the new format # where the old fft module is split to audiofile and fft modules # arg 1 = cfg-file my $done=0; open(CFGIN, "<$ARGV[0]"); while (<CFGIN>) { $line=$_; if ($line =~ m/module/ && !$done) { $line = <CFGIN>; unless ($line =~ m/\{/) { print "E...
667c590ca7377e5f434c87775ec83aab6189298a8f2117316d3a515e6b14fa64
Perl
1,137
36
#!/usr/bin/env perl use warnings; #sed replacement for -w perl parameter # Copyright Chao Weng # normalizations for hkust trascript # see the docs/trans-guidelines.pdf for details while (<STDIN>) { @A = split(" ", $_); for ($n = 0; $n < @A; $n++) { $a = $A[$n]; if (($a eq "{breath}")||($a eq "{cough}")|...
687c764f0a5eac0d24e828e448761e24b3f4c88393e581a52f0e88c8ca1f7da5
Perl
1,144
51
#!/usr/bin/perl use strict; use Cwd; use File::Basename; sub usage { print "\nUsage: $0 [ INPUT_VCF_FILE ] [ INPUT_VCF_DATABASE_FILE ] [ INPUT_VCF_DATABASE_FILE_PREFIX ] [ OUTPUT_VCF_FILE ] [ FASTA_REFERENCE_FILE ]\n"; } my ($inputVCFFile, $vcfDatabase, $vcfDatabasePrefix, $outputVCFFile, $referenceFile) = @ARGV...
44490a2f2c3ff5919b65538d313089db4b5c267ffb44fc79c43c227c4905cd24
Perl
1,148
47
#!/usr/bin/perl use strict; use Cwd; use File::Spec; use File::Basename; use Cwd 'abs_path'; =head =cut # directory of where this script is called my $cwd = dirname($0); sub usage { print "\nUsage: " . basename($0) . " [ INPUT-DIR ] [ OUTPUT-FILE ] "; } if ( @ARGV != 2 ) { usage; print "\n\n\tPlease ensure...
167a578f0b5c17cf2fb13cd35cb6bb5ac81e0293a02ad2b273856d6fc8dc1aea
Perl
1,155
51
#!/usr/bin/perl my $in = $ARGV[0]; my $out = $ARGV[1]; my $rowmetadata = $ARGV[2]; my $colmetadata = $ARGV[3]; my %hash; my %hash2; my $n = 0; open(M,$rowmetadata); while(<M>){ my $line = $_; $line =~s/\n//g;$line =~s/\r//g; $n++; my @infos = split(/\t/,$line); my $genus = $infos[1]; my $country = $infos[2]; m...
4a80b62a5f34205dff89a6c90e2762b2ba724334d6465cdabf173353c81c07c5
Perl
1,172
48
#!/usr/bin/env perl # Copyright 2016 Alibaba Robotics Corp. (Author: Xingyu Na) # # A script for char-based Chinese OOV lexicon generation. # # Input 1: char-based dictionary, example # CHAR1 ph1 ph2 # CHAR2 ph3 # CHAR3 ph2 ph4 # # Input 2: OOV word list, example # WORD1 # WORD2 # WORD3 # # where WORD1 is in the format...
1547e1c751d0f009590b236c4bd8ef359195b205a50fa0b9824ab1e30f2db27d
Perl
1,184
31
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
710a80bdeaafaca711fdcf1d04826f2ad3bc5fb7311151951aa3deeaf9378115
Perl
1,186
50
#!/usr/bin/env perl # Copyright 2013 Karlsruhe Institute of Technology (Author: Jonas Gehring) # Apache 2.0. # # Bursts a pfile into equally-sized parts # use Getopt::Std; use List::Util qw/min/; # Prints usage information sub usage() { print STDERR << "EOF"; Usage: pfile_burst <options> Where <options> include: -...
4ec380ebe80477e88b5f9e6a378b21bbe0e2f187939b09366c875a983210d824
Perl
1,187
31
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
95e699f9dee24addefce10a2d6bb9d4ac66c1c46aa3926077f1b41d95addbb3f
Perl
1,189
53
#!/usr/bin/perl use strict; use Cwd; use File::Spec; use File::Basename; =head # need to add 'chr' in front of chromosome column # change chrMT to chrM zcat 00-All.vcf.gz | head -500 | grep ^# > 00-All.modified.vcf zcat 00-All.vcf.gz | grep -v ^# | awk '{ print "chr"$0 }' | sed 's/chrMT/chrM/' >> 00-All.modified.vc...
63b5d482a42d2eefe4d327b8d2558e4fdaba1495dfa62d371926a21916926e50
Perl
1,196
41
#!/usr/bin/perl use strict; use Cwd; use File::Basename; sub usage { print "\nUsage: $0 [ INPUT_VCF_FILE ] [ OUTPUT_VCF_FILE ] \n"; } my ($inputVCFFile, $outputVCFFile) = @ARGV; # dirname of where this script is my $cwd = dirname($0); if (not defined $inputVCFFile) { usage; print "\n\tPlease provide inpu...
75aef4c7824b914319cdb90380e76987d77cc33ff390d2231080d9fd9df00dd7
Perl
1,211
37
#!/usr/bin/perl use strict; use Cwd; use File::Spec; use File::Basename; use Cwd 'abs_path'; # directory of where this script is called my $cwd = dirname($0); sub usage { print "\nUsage: " . basename($0) . " [ INPUT-DIR ] [ OUTPUT-PREDICTED-FILE ] [ ADDITIONAL_ARG ] "; } if ( @ARGV != 3 ) { usage; print "\n\n\...
1bedb91c9d8ce3cd6fd3611f80edf6f2114c2b3fa4cb5392b6340e730814a5ce
Perl
1,214
50
#!/usr/bin/perl use strict; use Cwd; use File::Spec; use File::Basename; =head wget ftp://ftp.broadinstitute.org/pub/ExAC_release/current/ExAC.r0.3.1.sites.vep.vcf.gz zcat ExAC.r0.3.1.sites.vep.vcf.gz | head -500 | grep ^# > ExAC.r0.3.1.sites.vep.modified.vcf zcat ExAC.r0.3.1.sites.vep.vcf.gz | grep -v ^# | aw...
067e0e6a68fac3aa3702e58737c7ece0a33492249b31d33461cf776fe3b98545
Perl
1,234
55
#!/usr/bin/env perl # This script takes a VCF on STDIN # tries to remove FILTER, QUAL, and INFO/* except for INFO/DEEPCT # and outputs it back to STDOUT while (<>) { if (not $x) { if (/^#/) { # We're in header if (/^#CHROM/) { # Last header line, remove FORMAT and s...
20add8b4eb91d88a9ac4cc55fe6fb11118fec0b11fcb81c9694a3caebd860240
Perl
1,238
39
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
d7d74f076742d2c30fae834cfdb1ce9ffc957a72bdc8997d56bf3b28d5b91200
Perl
1,272
43
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University (Author: Yenda Trmal) # Apache 2.0. #This script takes the source STM file and generates the *.txt files which #are usually part of the BABEL delivery #The *.txt files are not the part of the delivery for the evalpart1 subset #The program works as a filte...
ceddf9c07f4c3264cffb6c677685394f0fd88d56ee673e7bfc215e23126af20f
Perl
1,277
43
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University (Author: Yenda Trmal) # Apache 2.0. #This script takes the source STM file and generates the *.txt files which #are usually part of the BABEL delivery #The *.txt files are not the part of the delivery for the evalpart1 subset #The program works as a filt...
f1839ecd28d066ef0147be9d281a320899d90200b5158b9802ecd8d27757788a
Perl
1,282
57
#!/usr/bin/perl # Copyright 2020 Ivan Medennikov (STC-innovations Ltd) # Apache 2.0. # This script creates per-utterance json alignment by per-session alignment and segments. ($segments,$jsonali_scp,$jsonali_scp_perutt)=@ARGV; %ark={}; open(fidin, "<$jsonali_scp") or die "can't open $jsonali_scp : $!"; while (...
9af4633e0ec0deedbefe9cee842293fc8e6a320068090181bdfc64e50caeefd2
Perl
1,315
68
#!/usr/bin/env perl use strict; use warnings; use Encode; my $Usage = <<EOU; Usage: filter_keywords.pl <dictin> <queryin|-> <queryout|-> EOU if(@ARGV != 3) { die $Usage; } # Get parameters my $dictin = shift @ARGV; my $filein = shift @ARGV; my $fileout = shift @ARGV; # Open dictionary if (!open(D, "<$dictin"...
c6516d3790effdda7a9f5f7ba520a82fec2e9aeb940a8fa0616e3653967b39dd
Perl
1,324
55
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University (Author: Yenda Trmal) # Apache 2.0. # use strict; use warnings; use Getopt::Long; use XML::Simple; my $data = XMLin(\*STDIN); my $duptime= $ARGV[0]; #print Dumper($data); # Filters duplicate keywords that have the same keyword and about the same time. #...
9547c1eb024a4ef5c27e0ebdb8313c9fa0bb9d2a435ace742ea889342a024bc1
Perl
1,332
46
#!/usr/bin/perl #require "Parse_Form.lib"; #&Parse_Form; require "./cgi-lib.pl"; my (%formdata, # The form data %cgi_cfn, # The uploaded file(s) client-provided name(s) %cgi_ct, # The uploaded file(s) content-type(s). These are # set by the user's browser and may be unreliable ...
1ad166b62bd2accd4fb5614d8347716b57c0fbe280f56c98c0cccac9dcd5fcd4
Perl
1,342
65
#!/usr/bin/perl use strict; my $indir = $ARGV[0]; my $matrix = $ARGV[1]; my $out = $ARGV[2]; my $strain_names = $ARGV[3]; my %strains_of_gb; open(F,$strain_names); while(<F>){ my $line = $_; $line =~s/\n//g;$line =~s/\r//g; my ($gb,$strain) = split(/\t/,$line); $strains_of_gb{$gb} = $strain; } close(F); my %co...
f7536fd0fc1e7c68317d8dfc7a61fe01eb911470b5b167c48765d1859cd733f9
Perl
1,343
36
#!/usr/bin/env perl # Copyright 2017 Vimal Manohar # Apache 2.0 @ARGV == 2 || die "usage: normalize_bn97_transcripts.pl noise_word spoken_noise_word < transcript > transcript2"; $noise_word = shift @ARGV; $spoken_noise_word = shift @ARGV; while(<STDIN>) { $_ =~ m:^(\S+) (.+): || die "bad line $_"; $utt = $...
673dfd9c85cef9bd9d402c43955f7c475dd176029eb75a20cabfb4ab7dd695b2
Perl
1,345
55
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University (Author: Yenda Trmal) # Apache 2.0. # use strict; use warnings; use Getopt::Long; use XML::Simple; my $data = XMLin(\*STDIN); my $duptime= $ARGV[0]; #print Dumper($data); # Filters duplicate keywords that have the same keyword and about the same time. #...
48fb2c99f905a68b22b7cf438e38b96499046e37875b10c15afdaecf520dc510
Perl
1,381
42
#!/usr/bin/env perl use warnings; #sed replacement for -w perl parameter # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/...
e4a8ad9942e3b1c275d494ace330bed15501ef9dca34625a3c669e046e34aca9
Perl
1,399
51
#!/usr/bin/env perl use warnings; #sed replacement for -w perl parameter # Copyright 2012 Arnab Ghoshal # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
0631f4e3529c34f34ff9c57a98dcd8dd91207214038c75a89485df49eff899b1
Perl
1,426
43
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
bb35b5e1d83f7bdca71d572d9b696902365ec93d56bd1fd4574cc1a7bd17d0c8
Perl
1,433
72
#!/usr/bin/perl #merge_bams_in_tophat_folder.pl use warnings; use strict; die "Please give 1. Orthogroups.csv 2. Number of zeros you will allow\n" unless(@ARGV==2); my $orthogroupscsv=$ARGV[0]; open(my $IN_b, "<", $orthogroupscsv) or die "Could not open $orthogroupscsv \n"; my $number_to_merge=$ARGV[1]; my $outfi...
551ea61e4fbba766586e72530e23e35d1dd59644efaf6b5e472daaf40cab01b4
Perl
1,438
49
#!/usr/bin/perl use File::Copy; @test_set = qw(GDF1); $abs_dir = "/d/ls3/d/apache/dreive.cryst.bbk.ac.uk/"; $abs_html = "http://dreive.cryst.bbk.ac.uk/"; foreach $gene_name (@test_set){ while (1){ $code = int(rand 100000) + 1; $result = "$abs_dir"."htdocs/tmp/result"."$code"; last unless (-e $result); ...
60c94e8a40d710f29e8b2e2ff72c91bb51cff3dcb11234c6865aade4360053f8
Perl
1,448
58
#!/usr/bin/env perl # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS...
cdaa41c004d808692d9cbee2bd7d49b4b6cece0ff003a8c75164499e44fa7b40
Perl
1,499
53
#!/usr/bin/env perl use warnings; #sed replacement for -w perl parameter # Copyright 2012 Johns Hopkins University (author: Daniel Povey) # makes lexicon FST -- special version only for use in keyword search # for allowing optional silences between words. This version has # no pron-probs involved, and # does support...
995796132945d0dd8e9892995d49d1b2a9a68d837d1924b570960bcab60b638a
Perl
1,500
53
#!/usr/bin/env perl use warnings; #sed replacement for -w perl parameter # Copyright 2012 Johns Hopkins University (author: Daniel Povey) # makes lexicon FST -- special version only for use in keyword search # for allowing optional silences between words. This version has # no pron-probs involved, and # does suppor...
3db36534ead5e9a9a568b0cea825adc8398deb0ee7327d60135975e460890e58
Perl
1,514
61
#!/usr/bin/env perl # The test script is written in Perl. It runs the deep_picker program with a test input file and checks the output file for the expected peak coordinates. If the peak coordinates match the expected values, the test script returns a success code (0), otherwise it returns an error code (1). The test ...
4f899b23f7a585e457687551d5f9bb51bd6c848acd207652892ef18ad2c93b27
Perl
1,523
59
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $dataid = shift; my %coverage = ( "Cornidoviridae.genomes.fasta" => 47.5, "Homo_sapiens.GRCh38.cdna.e99.canonicaltranscripts.fasta" => 0.227, "Influenza.genomes.fasta" => 9.65, "Metapneumovirus.genomes.fasta" => 228, "Rhinovirus.genomes.fasta" => 16.7,...
8414a964c273b61d3ba67f64af3e22f2bc04fd43652eb01bece30bd61557644d
Perl
1,530
48
#!/usr/bin/perl # Sets the alignment and hmmnet fields in the recipe file. These are # the ones used for output during training, so they should be unique # to the different model trainings (the hmmnets can be shared if the # context phoneme tying remains the same). # The script is given the recipe and path prefixes a...
1965a0596bbfa2105c3d78bfe882dc57f27c7317e7cdd9af5535f4dfc10bcfa9
Perl
1,549
61
#!/usr/bin/env perl # The test script is written in Perl. It runs the deep_picker program with a test input file and checks the output file for the expected peak coordinates. If the peak coordinates match the expected values, the test script returns a success code (0), otherwise it returns an error code (1). The test ...
d32bdcf3e0805b9053b22a99766f8e65b99382faf008446ab5f416aa1549bb63
Perl
1,551
59
#!/usr/bin/perl #require "Parse_Form.lib"; #&Parse_Form; use SP_vert; require "./cgi-lib.pl"; my (%formdata, # The form data %cgi_cfn, # The uploaded file(s) client-provided name(s) %cgi_ct, # The uploaded file(s) content-type(s). These are # set by the user's browser and may b...
20db1b5cc6b094f7132d01e8491beba0eb654566efc46bef4ee22cc27e438bb7
Perl
1,568
62
#!/usr/bin/env perl # The test script is written in Perl. It runs the voigt_fit program with a test input file and checks the output file for the expected peak coordinates. # If the peak coordinates match the expected values, the test script returns a success code (0), otherwise it returns an error code (1). # The t...
2330b4aceb294ccc214f30883a8d3dda07ed586b67a05410933529f3b9f8242e
Perl
1,570
62
#!/usr/bin/env perl # The test script is written in Perl. It runs the voigt_fit program with a test input file and checks the output file for the expected peak coordinates. # If the peak coordinates match the expected values, the test script returns a success code (0), otherwise it returns an error code (1). # The t...
ca5661bf5a75a1c35d6812de4ac63ac7c8f82fb3f6f551874334fc47bd77aac4
Perl
1,575
63
#!/usr/bin/env perl # The test script is written in Perl. It runs the voigt_fit program with a test input file and checks the output file for the expected peak coordinates. # If the peak coordinates match the expected values, the test script returns a success code (0), otherwise it returns an error code (1). # The t...
6848037ce908ce60d43c8d5e45e9b905fa1bf6b036d2257816002d218e5fd779
Perl
1,626
73
#!/usr/bin/perl # Copyright 2020 Ivan Medennikov (STC-innovations Ltd) # Apache 2.0. ($filein,$utt2spk,$utt2dur,$chunk,$fileout,$fileout2,$fileout3)=@ARGV; %utt2dur={}; open(fidin, "<$utt2dur") or die "can't open $utt2dur : $!"; while ($line=<fidin>) { $line=~s/\s+$//; @items=split(/\s+/,$line); $utt2dur{...
e80d47071908045880518845936af004cc54d72da408a5ae067e657d4cfcb523
Perl
1,647
66
#!/usr/bin/perl -w #author:pcj use Parallel::ForkManager; use strict; my($idmapping_file,$blast6_out_dir,$databas,$max_process); if($#ARGV<0){ &usage; exit; } $idmapping_file=shift; $blast6_out_dir=shift; #$databas=shift; $max_process=shift; $max_process||=4; sub usage{ my $parameters=<<"USAGE"; This script is t...
0a7e6cdcfaab379911aa392cd859fcaedd2845097db6f3c53b7053fb224efffc
Perl
1,649
52
#!/usr/bin/perl use strict; use warnings; use File::Basename; sub usage { print "\nUsage: " . basename($0) . " [ INPUT-DIR ] [ OUTPUT-VCF-FILE ]"; } if ( @ARGV != 2 ) { usage; print "\n\n\tPlease ensure to have 2 agruments:\n\tinput dir contained *features* files\n\toutput VCF file name including version number!...
4c2b22709262d4c90f3c2c65ea75d587375dd03aeab6b6ee414288486f6aa981
Perl
1,650
61
#!/usr/bin/env perl #=============================================================================== # Copyright 2015 (Author: Yenda Trmal <jtrmal@gmail.com>) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy o...
153375a6340c97633948260c3303ec7d189abb64819312911b3246354da3734d
Perl
1,652
94
#!/usr/bin/perl ### usage cat vcf | addAnnvarToVcf.pl varFuncFile exonicVarFuncFile > annovar.vcf use strict; use warnings; my $varFuncFile = $ARGV[0]; my $exonicVarFuncFile = $ARGV[1]; my %varFunc; my %exonicVarFunc; my $l; my @f; # pull variant function file into hash open (FILE, "<$varFuncFile") or die "Couldn...
791d878af1a80f26e87daa0b9ed686a3c23c92131c989b80d80ab1abdde9521a
Perl
1,656
37
#!/usr/bin/perl use strict; my $directory; if ($ARGV[0]){ $directory = $ARGV[0]; } else{ print "You must provide as an argument a directory containing fastq.gz file for testing the presence of ITS sequences\nex: perl assignFastqByITS.pl my_fastq_dir\n"; exit; } my %sequences =( "1"=>"ATGGTAAAAAAGGTGAAAACCTTTTTTCC...
fad389993d6374799f53870a37164040f7469c9669bf2bb0544f16e5d98e9b2b
Perl
1,667
50
#!/usr/bin/env perl # This program takes candidate prons from "get_candidate_prons.pl" or # "limit_candidate_prons.pl", and a reference dictionary covering those words, # and outputs the same format but with scoring information added (so we go from # 6 to 7 fields). The scoring information says, for each generated pr...
9c4419f56998aba230ad00f68006b91da75a46c29db2a94d24e86f636a150e31
Perl
1,676
65
#!/usr/bin/env perl # Once the phonetic representation for words is generated by the LDC lexicon # This script converts them into a KALDI compatible format # In addition, it extends the list of phonemes to consider based on # orthograhic representations of those words which do not have stressed vowels use utf8; ($tm...
0ad86296e9a9ba5c5c220131d47e78647f62941cddaa200b63fc519c6d02a51c
Perl
1,702
71
#!/usr/bin/perl # Converts transcript from standard input to triphone phn use locale; use strict; while (<>) { triphonize($_); } sub triphonize { my $sent = shift(@_); $sent =~ s/^\s+//; $sent =~ s/\s+$//; $sent =~ s/\s+/ /g; $sent =~ s/ _ /_/g; my (@left_queue, @center_queue, @right_queue); my ...
df482e2757c24fb4bb19c27e29ac42e52a7b4b81e2f481f35c54c3cacea86e0d
Perl
1,705
72
#!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Data::Dumper; my ($inputfasta, $maxseqlen, $depth, $strand, $outputfasta) = @ARGV; GetOptions ("inputfasta|i=s" => \$inputfasta, # path to input fasta file for sampling "maxseqlen|l=i" => \$maxseqlen, # numeric integer for maximum le...
6182d806d01ae5c40e33ee6384464985a28a452ce77f8895d3cd06f07bd06390
Perl
1,720
66
#!/usr/bin/env perl # Copyright 2014 Gaurav Kumar. Apache 2.0 # Once the phonetic representation for words is generated by the LDC lexicon # This script converts them into a KALDI compatible format # In addition, it extends the list of phonemes to consider based on # orthograhic representations of those words which ...
a461ffee6292254c23b1caf85eac79ba2a8c835464f3d5cb35584b1548942727
Perl
1,758
52
#!/usr/bin/env perl # This program takes the output of count_rules.pl, which is tuples # of the form # # rule;destress;right-count;partial-count;wrong-count # # and outputs lines of the form # # rule;de-stress;score # # where the score, between 0 and 1 (1 better), is # equal to: # # It forms a score between 0 and 1, ...
055a72450fd56e7623d1e2ca8c629676caa0aa6cf6658ce611db3340f38e28d3
Perl
1,767
74
#!/usr/bin/perl my $eps = ","; my @num_incoming = (); my @incoming_label = (); use Fsm; use strict; # Load FST my $fsm = Fsm->new; $fsm->read_fst(shift); # Find the word arcs and count incoming arcs my @word_arcs = (); for my $s (@{$fsm->{"V"}}) { # Iterate over each state for my $a (@$s) { # Iterate over each a...
899455b901fb10b8409a4b6b763c2a5f6db969bee74e261899c954d12d3c6cb0
Perl
1,772
71
#!/usr/bin/env perl # Copyright 2017 John Morgan # Apache 2.0. #usma_nonnative_make_lists.pl - make acoustic model training lists use strict; use warnings; use Carp; use File::Spec; use File::Copy; use File::Basename; my $tmpdir = "data/local/tmp/usma/nonnative"; # input wav file list my $w = "$tmpdir/wav_list.tx...
2b1d02eaf268e505e8238957155ca9974137cf8972135ead75bb7666f50961fa
Perl
1,775
70
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University (Author: Yenda Trmal) # Apache 2.0. use Data::Dumper; $Data::Dumper::Indent = 1; binmode STDOUT, ":utf8"; binmode STDIN, ":utf8"; $ignore_oov = 0; $ignore_first_field = 0; for($x = 0; $x < 2; $x++) { if ($ARGV[0] eq "-f") { shift @ARGV; $field_...
f078ebd639f5c1c44ec556aaa93c4a99a69bc751362a2100d9e31aeaef06eae2
Perl
1,785
70
#!/usr/bin/env perl # Copyright 2012 Johns Hopkins University (Author: Yenda Trmal) # Apache 2.0. use Data::Dumper; $Data::Dumper::Indent = 1; binmode STDOUT, ":utf8"; binmode STDIN, ":utf8"; $ignore_oov = 0; $ignore_first_field = 0; for($x = 0; $x < 2; $x++) { if ($ARGV[0] eq "-f") { shift @ARGV; $fie...
174fb2a4d6d443cce1aee51d1a4976617bcc282ac5541c73d1a296548f99e2e1
Perl
1,787
63
#!/usr/bin/perl use strict; use warnings; #hardip@rstudio-nci:~/pacific$ # /media/dstore/covid19/seqid.vs.genomeinfo.txt #hardip@rstudio-nci:~/pacific$ # /media/dstore/covid19/virus.genbank.20200324.fa #V1 V2 V3 taxid assemblyname organism lineage #GCA_000837105.1 ViralMultiSegProj14079 L14461.1 223359 ViralMultiSegP...
fe3314c9f697156a7d62f7085c0308890c8f494a0f937ea9ff5b87c1dc9d166f
Perl
1,799
50
#!/usr/bin/env perl # This takes the output of e.g. get_candidate_prons.pl or limit_candidate_prons.pl, # which is 7-tuples, one per line, of the form: # word;pron;base-word;base-pron;rule-name;de-stress;rule-score # (where rule-score is somtimes listed as optional, but this # program does expect it, since we don't a...