title: awk not printing correct value for 1 condition that uses multiple criteria
body: <p>Thanks to @Jose Ricardo Bustos M. whos help led to the below using <code>file1</code> and <code>file2</code>:</p>
  
  <p>However, I can not seem to capture <code>BRCA2</code> from <code>file1</code> with <code>BRCA 1, BRCA2</code> from <code>file2</code> (line 2 skipping the header). I am not sure if this is because <code>BCRA2</code> is the second instance after the <code>,</code> or if problem that <code>$7</code>is <code>full gene sequence and full deletion/duplication analysis</code>, that is <code>full gene sequence</code> is a partial match to the full line in <code>$7</code>?  Thank you :).</p>
  
  <p><strong>file1</strong></p>
  
  <pre><code>BRCA2
  BCR
  SCN1A
  fbn1
  </code></pre>
  
  <p><strong>file2</strong></p>
  
  <pre><code>Tier    explanation .   List code   gene    gene name   methodology disease
  Tier 1  .   .   811 DMD dystrophin  deletion analysis and duplication analysis, if performed Publication Date: January 1, 2014  Duchenne/Becker muscular dystrophy
  Tier 1  .   Jan-16  81  BRCA 1, BRCA2   breast cancer 1 and 2   full gene sequence and full deletion/duplication analysis   hereditary breast and ovarian cancer
  Tier 1  .   Jan-16  70  ABL1    ABL1    gene analysis variants in the kinse domane  acquired imatinib tyrosine kinase inhibitor
  Tier 1  .   .   806 BCR/ABL 1   t(9;22) major breakpoint, qualitative or quantitative   chronic myelogenous leukemia CML
  Tier 1  .   Jan-16  85  FBN1    Fibrillin   full gene sequencing    heart disease
  Tier 1  .   Jan-16  95  FBN1    fibrillin   del/dup heart disease
  </code></pre>
  
  <p><strong>awk</strong></p>
  
  <pre><code>awk 'BEGIN{FS=OFS="\t"}  # define fs and output
  {$0=toupper($0)}  # convert all `file1` to uppercase
  {$5=toupper($5)} # convert '$5' in `file2` to uppercase
  {$7=toupper($7)} # convert '$7' in `file2` to uppercase
  FNR==NR{ # process each field in line of `file1`
  if(NR&gt;1 &amp;&amp; ($7 ~ /FULL GENE SEQUENC/)) {  # skip header and check for full gene sequenc or full gene sequencing, using `regexp`
        gsub(" ","",$5)       #removing white space
        n=split($5,v,"/")
        d[v[1]] = $4          #from split, first element as key
    }
    next
  }{print $1, ($1 in d?d[$1]:279)}' file2 file1 # print name then default if no match
  
  BRCA2    279
  BCR    279
  SCN1A    279
  FBN1    85
  </code></pre>
  
  <p>desired output</p>
  
  <pre><code>BRCA2    81  --- match in line 2 of $5 in file 2, BRCA 1, BRCA2 and $7 has full gene sequence
  BCR    279
  SCN1A    279
  FBN1    85
  </code></pre>