text: user1545: I'm using CRCmapper on my data. There are several modules in the tool. I've used exactly instructed in the usage.
  Commands used:
  python CRCmapper.py -e MB12_noEncBlack_AllEnhancers.table.txt -b MB12.bam -g HG19 -f hg19-stdChr/ -s MB12_peaks.bed -n MB12 -o MB12/
  
  Here is the error I got:
  Warning: text mode turns off computation of q-values
  IDENTIFY TF-TF INTERACTIONS
  Traceback (most recent call last):
    File "CRCmapper.py", line 605, in <module>
      main()
    File "CRCmapper.py", line 593, in main
      graph = buildNetwork(projectFolder, projectName, candidateGenes, refseqToNameDict, motifConvertFile)
    File "CRCmapper.py", line 381, in buildNetwork
      target = refseqToNameDict[region[0]]
  KeyError: 'AP1'
  
  My expertise in python is very basic. I would be grateful if someone take a look at this error and suggest how to fix.
  P.S. I contacted authors a long back, I didn't get any response.
  Thank you.
  
  user3563: It seems that the author of CRCmapper.py wants to extract sequence_name, start, stop columns from fimo.txt file. But the code extract motif_alt_id, sequence_name, start columns. So the index of the code should be changed.
  fimo.txt looks like this:
  motif_id    motif_alt_id    sequence_name   start   stop    strand  score   p-value q-value matched_sequence
  Transfac.V$AP1_02   AP1 NM_003046931|3|95762|152118 2332    3118    -   11.9802 6.49e-05        TGACTCA
  
  In line 377-382 of the code:
  line[1] should be changed to line[2].
  for line in fimoTable[1:]:
      source = motifDatabaseDict[line[0]]
      region = line[1].split('|')
      target = refseqToNameDict[region[0]]
      location = (region[1], int(region[2]), int(region[3]))
  
  In line 391-394 of the code:
  line[2] should be changed to line[3], line[3] should be changed to line[4].
      # Count unique motifs
      if (region[1], int(region[2]) + int(line[2]), int(region[2]) + int(line[3])) not in motifDictSE[source]:
          edgeCountDictSE[(source, target)] += 1
          motifDictSE[source].append((region[1], int(region[2]) + int(line[2]), int(region[2]) + int(line[3])))
  
  
  user4926: This error came from the fact that  the output of the new fimo version has an additional 'motif_alt_id' column in second position. 
  CRCmapper has been modified to take this into account. You can find the updated version here: https://bitbucket.org/young_computation/crcmapper/src/master/
  P.S.: sorry if we missed you request user1545 and thanks for using CRCmapper!
  
original_text: 1545: <p>I'm using <a href="https://bitbucket.org/young_computation/crcmapper/overview" rel="nofollow noreferrer">CRCmapper</a> on my data. There are several modules in the tool. I've used exactly instructed in the usage.</p>
  
  <p>Commands used:</p>
  
  <pre><code>python CRCmapper.py -e MB12_noEncBlack_AllEnhancers.table.txt -b MB12.bam -g HG19 -f hg19-stdChr/ -s MB12_peaks.bed -n MB12 -o MB12/
  </code></pre>
  
  <p>Here is the error I got:</p>
  
  <pre><code>Warning: text mode turns off computation of q-values
  IDENTIFY TF-TF INTERACTIONS
  Traceback (most recent call last):
    File "CRCmapper.py", line 605, in &lt;module&gt;
      main()
    File "CRCmapper.py", line 593, in main
      graph = buildNetwork(projectFolder, projectName, candidateGenes, refseqToNameDict, motifConvertFile)
    File "CRCmapper.py", line 381, in buildNetwork
      target = refseqToNameDict[region[0]]
  KeyError: 'AP1'
  </code></pre>
  
  <p>My expertise in python is very basic. I would be grateful if someone take a look at this error and suggest how to fix.</p>
  
  <p>P.S. I contacted authors a long back, I didn't get any response.</p>
  
  <p>Thank you.</p>
   3563: <p>It seems that the author of CRCmapper.py wants to extract <code>sequence_name</code>, <code>start</code>, <code>stop</code> columns from <code>fimo.txt</code> file. But the code extract <code>motif_alt_id</code>, <code>sequence_name</code>, <code>start</code> columns. So the index of the code should be changed.</p>
  
  <p><code>fimo.txt</code> looks like this:</p>
  
  <pre><code>motif_id    motif_alt_id    sequence_name   start   stop    strand  score   p-value q-value matched_sequence
  Transfac.V$AP1_02   AP1 NM_003046931|3|95762|152118 2332    3118    -   11.9802 6.49e-05        TGACTCA
  </code></pre>
  
  <p>In line 377-382 of the code:</p>
  
  <p><code>line[1]</code> should be changed to <code>line[2]</code>.</p>
  
  <pre><code>for line in fimoTable[1:]:
      source = motifDatabaseDict[line[0]]
      region = line[1].split('|')
      target = refseqToNameDict[region[0]]
      location = (region[1], int(region[2]), int(region[3]))
  </code></pre>
  
  <p>In line 391-394 of the code:</p>
  
  <p><code>line[2]</code> should be changed to <code>line[3]</code>, <code>line[3]</code> should be changed to <code>line[4]</code>.</p>
  
  <pre><code>    # Count unique motifs
      if (region[1], int(region[2]) + int(line[2]), int(region[2]) + int(line[3])) not in motifDictSE[source]:
          edgeCountDictSE[(source, target)] += 1
          motifDictSE[source].append((region[1], int(region[2]) + int(line[2]), int(region[2]) + int(line[3])))
  </code></pre>
   4926: <p>This error came from the fact that  the output of the new fimo version has an additional 'motif_alt_id' column in second position. </p>
  
  <p>CRCmapper has been modified to take this into account. You can find the updated version here: <a href="https://bitbucket.org/young_computation/crcmapper/src/master/" rel="nofollow noreferrer">https://bitbucket.org/young_computation/crcmapper/src/master/</a></p>
  
  <p>P.S.: sorry if we missed you request user1545 and thanks for using CRCmapper!</p>
  