I can do everything except for the rm
and run the perl
, but that may be related. Thank you :).
+ cd 'C:\Users\cmccabe\Desktop\annovar'
+ echo -n ''
+ cd C: C:/Users/cmccabe/Desktop/Python27/
+ echo -n ''
+ menu
+ true
+ printf '\n Welcome to target gene annotation, please make a selection from the
MENU \n
==================================\n\n
\t 1 GJB2 analysis\n
\t 2 MECP2 analysis\n
\t 3 Phox2B analysis\n
\t 4 Exit\n\n
==================================\n\n'
Welcome to target gene annotation, please make a selection from the MENU
==================================
1 GJB2 analysis
2 MECP2 analysis
3 Phox2B analysis
4 Exit
==================================
+ printf '\t Your choice: '
Your choice: + read menu_choice
1
+ case "$menu_choice" in
+ gjb2
+ printf '\n\n'
+ printf 'What is the id of the patient getting GJB2 analysis : '
What is the id of the patient getting GJB2 analysis : + read id
del
+ '[' -z del ']'
+ printf 'Enter variant(s): '
Enter variant(s): + IFS=,
+ read -a variant
c.79G>A
+ '[' -z del ']'
+ '[' del = end ']'
+ (( i=0 ))
+ (( i<1 ))
+ printf 'NM_004004.5:%s\n' 'c.79G>A'
+ (( i++ ))
+ (( i<1 ))
+ add2text del.txt
+ cd 'C:\Users\cmccabe\Desktop\annovar'
+ echo del.txt
+ cd C: C:/Users/cmccabe/Desktop/Python27/
+ printf 'NM_004004.5:%s\n' 'c.79G>A'
+ additionalg
+ printf '\n\n'
+ printf 'Are there additonal GJB2 patients to be analyzed? Y/N '
Are there additonal GJB2 patients to be analyzed? Y/N + read match_choice
n
+ case "$match_choice" in
+ id=del
+ gjb2name
+ printf '\n\n'
+ cd C:
+ C:/Users/cmccabe/Desktop/Python27/python.exe C:/Users/cmccabe/Desktop/Python27
/run_batch_job.py C:/Users/cmccabe/Desktop/Python27/out.txt C:/Users/cmccabe/Des
ktop/Python27/out_name.txt NameChecker
+ check
+ printf '\n\n'
+ awk 'NR>1 { if ($2 ~ /^\(/ ) {$1=""; print "Found error: ", $0} else { sub(/.*
:/, "", $1); sub(/.*:/, "", $7); print "No error: " $1 "," $7}}' C:/Users/cmccab
e/Desktop/Python27/out_name.txt
No error: c.79G>A,p.(Val27Ile)
+ printf 'Is the variant correct? Y/N '
Is the variant correct? Y/N + read match_choice
y
+ case "$match_choice" in
+ id=del
+ position
+ printf '\n\n'
+ cd C:
+ C:/Users/cmccabe/Desktop/Python27/python.exe C:/Users/cmccabe/Desktop/Python27
/run_batch_job.py C:/Users/cmccabe/Desktop/Python27/out.txt C:/Users/cmccabe/Des
ktop/annovar/out_position.txt PositionConverter
+ parse
+ printf '\n\n'
+ cd 'C:\Users\cmccabe\Desktop\annovar'
+ perl -ne 'next if $. == 1;
while (/\t*NC_(\d+)\.\S+g\.(\d+)(\S+)/g) {
# conditional parse
($num1, $num2, $common) = ($1, $2, $3);
$num3 = $num2;
if ($common =~ /^([A-Z])>([A-Z])$/) { ($ch1, $ch2) = ($1, $
2) } # SNP
elsif ($common =~ /^del([A-Z])$/) { ($ch1, $ch2) = ($1, "
-") } # deletion
elsif ($common =~ /^ins([A-Z])$/) { ($ch1, $ch2) = ("-",
$1) } # insertion
elsif ($common =~ /^_(\d+)del([A-Z]+)$/) { ($num3, $ch1, $ch2) =
($1, $2, "-") } # multi deletion
elsif ($common =~ /^_(\d+)ins([A-Z]+)$/) { ($num3, $ch1, $ch2) =
($1, "-", $2) } # multi insertion
printf ("%d\t%d\t%d\t%s\t%s\n", $num1, $num2, $num3, $ch1, $ch2)
; # output
map {undef} ($num1, $num2, $num3, $common, $ch1, $ch2);
}
' out_position.txt
+ annovar
+ printf '\n\n'
+ printf 'How many patients would you like to annotate : '
How many patients would you like to annotate : + read id
1
+ '[' -z 1 ']'
+ '[' 1 = end ']'
+ cd 'C:\Users\cmccabe\Desktop\annovar'
+ awk '{close(fname)} (getline fname<f)>0 {print>fname}' f=target.txt out_parse.
txt
++ perl -ne 'chomp; system ("perl table_annovar.pl $_ humandb/ -buildver hg19 -p
rotocol refGene,popfreq_all,common,clinvar,clinvarsubmit,clinvarreference -opera
tion g,f,f,f,f,f -otherinfo")'
-----------------------------------------------------------------
NOTICE: Processing operation=g protocol=refGene
NOTICE: Running with system command <annotate_variation.pl -geneanno -buildver h
g19 -dbtype refGene -outfile del.txt.refGene -exonsort del.txt humandb/>
NOTICE: Reading gene annotation from humandb/hg19_refGene.txt ... Done with 251
transcripts (including 5 without coding sequence annotation) for 106 unique gene
s
NOTICE: Reading FASTA sequences from humandb/hg19_refGeneMrna.fa ... Done with 1
sequences
NOTICE: Finished gene-based annotation on 1 genetic variants in del.txt
NOTICE: Output files were written to del.txt.refGene.variant_function, del.txt.r
efGene.exonic_variant_function
-----------------------------------------------------------------
NOTICE: Processing operation=f protocol=popfreq_all
NOTICE: Running system command <annotate_variation.pl -filter -dbtype popfreq_al
l -buildver hg19 -outfile del.txt del.txt humandb/ -otherinfo>
NOTICE: the --dbtype popfreq_all is assumed to be in generic ANNOVAR database fo
rmat
NOTICE: Variants matching filtering criteria are written to del.txt.hg19_popfreq
_all_dropped, other variants are written to del.txt.hg19_popfreq_all_filtered
NOTICE: Processing next batch with 1 unique variants in 1 input lines
NOTICE: Database index loaded. Total number of bins is 2816654 and the number of
bins to be scanned is 1
NOTICE: Scanning filter database humandb/hg19_popfreq_all.txt...Done
-----------------------------------------------------------------
NOTICE: Processing operation=f protocol=common
NOTICE: Running system command <annotate_variation.pl -filter -dbtype common -bu
ildver hg19 -outfile del.txt del.txt humandb/>
NOTICE: the --dbtype common is assumed to be in generic ANNOVAR database format
NOTICE: Variants matching filtering criteria are written to del.txt.hg19_common_
dropped, other variants are written to del.txt.hg19_common_filtered
NOTICE: Processing next batch with 1 unique variants in 1 input lines
NOTICE: Scanning filter database humandb/hg19_common.txt...Done
-----------------------------------------------------------------
NOTICE: Processing operation=f protocol=clinvar
NOTICE: Running system command <annotate_variation.pl -filter -dbtype clinvar -b
uildver hg19 -outfile del.txt del.txt humandb/>
NOTICE: the --dbtype clinvar is assumed to be in generic ANNOVAR database format
NOTICE: Variants matching filtering criteria are written to del.txt.hg19_clinvar
_dropped, other variants are written to del.txt.hg19_clinvar_filtered
NOTICE: Processing next batch with 1 unique variants in 1 input lines
NOTICE: Scanning filter database humandb/hg19_clinvar.txt...Done
-----------------------------------------------------------------
NOTICE: Processing operation=f protocol=clinvarsubmit
NOTICE: Running system command <annotate_variation.pl -filter -dbtype clinvarsub
mit -buildver hg19 -outfile del.txt del.txt humandb/>
NOTICE: the --dbtype clinvarsubmit is assumed to be in generic ANNOVAR database
format
NOTICE: Variants matching filtering criteria are written to del.txt.hg19_clinvar
submit_dropped, other variants are written to del.txt.hg19_clinvarsubmit_filtere
d
NOTICE: Processing next batch with 1 unique variants in 1 input lines
NOTICE: Scanning filter database humandb/hg19_clinvarsubmit.txt...Done
-----------------------------------------------------------------
NOTICE: Processing operation=f protocol=clinvarreference
NOTICE: Running system command <annotate_variation.pl -filter -dbtype clinvarref
erence -buildver hg19 -outfile del.txt del.txt humandb/>
NOTICE: the --dbtype clinvarreference is assumed to be in generic ANNOVAR databa
se format
NOTICE: Variants matching filtering criteria are written to del.txt.hg19_clinvar
reference_dropped, other variants are written to del.txt.hg19_clinvarreference_f
iltered
NOTICE: Processing next batch with 1 unique variants in 1 input lines
NOTICE: Scanning filter database humandb/hg19_clinvarreference.txt...Done
-----------------------------------------------------------------
NOTICE: Multianno output file is written to del.txt.hg19_multianno.txt
+ printf 'The annotation is complete, would you like analyze additional target g
ene patients? Y/N '
The annotation is complete, would you like analyze additional target gene patien
ts? Y/N + read match_choice
n
+ case "$match_choice" in
+ id=
+ remove
+ printf '\n\n'
+ printf 'Removing old files, please wait '
Removing old files, please wait + rm 'C:\Users\cmccabe\Desktop\annovar\out_posit
ion.txt'
+ rm 'C:\Users\cmccabe\Desktop\annovar\out_parse.txt'
+ cd C:
+ rm c:/Users/cmccabe/Desktop/Python27/.txt
rm: cannot remove 'c:/Users/cmccabe/Desktop/Python27/.txt': No such file or dire
ctory
+ cd C:
+ rm c:/Users/cmccabe/Desktop/Python27/out_name.txt
+ printf '\n Old files removed, formatting for matrix '
Old files removed, formatting for matrix + matrix
+ cd 'C:\Users\cmccabe\Desktop\annovar'
+ 'C:\Users\cmccabe\Desktop\annovar\matrix.pl'
c:\cygwin\home\cmccabe\bashparse.sh: line 157: .txt.hg19_multianno.txt: No such
file or directory
+ printf 'Process complete and new file saved in, Are there additional target ge
ne patients? Y/N '
Process complete and new file saved in, Are there additional target gene patient
s? Y/N + read match_choice
---------- Post updated at 10:12 AM ---------- Previous update was at 09:50 AM ----------
The below is what I am trying to remove. Is it not $id.txt in rm
?
printf "NM_004004.5:%s\n" ${variant[$i]} >> c:/Users/cmccabe/Desktop/Python27/$id.txt