text: user16725: I have some problems with ClinCNV(https://github.com/imgag/ClinCNV):
  I made a BED file from a BAM, then i made a GC count with ngs-bits (link: https://github.com/imgag/ngs-bits )
  The main idea of redacting a BED file is making GC content, but i think i need to remove all other columns. Here an example:
  My BED:
  chr1    10041   10086   NB501410:34:H23TGAFXY:1:11102:23474:15441/1     0       +       0.4889 
  
  In description says:
  chr1    12171   12245   0.4595 
  
  I tried to run script with my BED file and there is an issue:
   Rscript ClinCNV/clinCNV.R --normal myfolder/myfile.cov --out myfolder/ --bed myfolder/myfileGCannotated.bed --folderWithScript ClinCNV/
  
  and there is an output:
  "We run script located in folder /root/myfolder . Please, specify ABSOLUTE paths, relative paths do not work for every machine. If everything crashes, please, check the correctness of this path first."
  
  
  [1] "START cluster allocation."
  
  [1] "Cluster allocated."
  
  [1] "END cluster allocation."
  
  [1] "We are started with reading the coverage files and bed files 2023-01-02 13:49:43"
  
  Error in fread(fileName, header = F, stringsAsFactors = F, sep = "\t") :
    File 'myfolder/myfileGCannotated.bed' does not exist or is non-readable. getwd()=='/root/ClinCNV'
  Calls: ReadFileFast -> as.data.frame -> fread
  Execution halted
  
  Now I started the script with absolute paths and it works but I have a new problem:
  Error in setnames(localDf <- as.data.frame(fread(fileName, skip = 1, header = F,  :
    Can't assign 4 names to a 7 column data.table
  Calls: ReadFileFast -> setnames
  Execution halted
  
  
  user298: The error message is telling you:
  
  "We run script located in folder /root/myfolder . Please, specify ABSOLUTE paths, relative paths do not work for every machine. If everything crashes, please, check the correctness of this path first."
  
  So it sounds like you simply need to use absolute instead of relative paths. Something like this:
  Rscript /home/yourUser/ClinCNV/clinCNV.R \
      --normal /home/yourUser/myfolder/myfile.cov \
      --out /home/yourUser/myfolder/ \
      --bed /home/yourUser/myfolder/myfileGCannotated.bed \
      --folderWithScript /home/yourUser/ClinCNV/
  
  Also, don't run things as root unless absolutely necessary. if anything goes wrong or if any of your scripts or tools has a bug, you could end up breaking your machine if you run as root.
  
original_text: 16725: <p>I have some problems with ClinCNV(<a href="https://github.com/imgag/ClinCNV" rel="nofollow noreferrer">https://github.com/imgag/ClinCNV</a>):</p>
  <p>I made a BED file from a BAM, then i made a GC count with ngs-bits (link: <a href="https://github.com/imgag/ngs-bits" rel="nofollow noreferrer">https://github.com/imgag/ngs-bits</a> )
  The main idea of redacting a BED file is making GC content, but i think i need to remove all other columns. Here an example:</p>
  <p>My BED:</p>
  <pre><code>chr1    10041   10086   NB501410:34:H23TGAFXY:1:11102:23474:15441/1     0       +       0.4889 
  </code></pre>
  <p>In description says:</p>
  <pre><code>chr1    12171   12245   0.4595 
  </code></pre>
  <p>I tried to run script with my BED file and there is an issue:</p>
  <pre><code> Rscript ClinCNV/clinCNV.R --normal myfolder/myfile.cov --out myfolder/ --bed myfolder/myfileGCannotated.bed --folderWithScript ClinCNV/
  </code></pre>
  <p>and there is an output:</p>
  <pre><code>&quot;We run script located in folder /root/myfolder . Please, specify ABSOLUTE paths, relative paths do not work for every machine. If everything crashes, please, check the correctness of this path first.&quot;
  
  
  [1] &quot;START cluster allocation.&quot;
  
  [1] &quot;Cluster allocated.&quot;
  
  [1] &quot;END cluster allocation.&quot;
  
  [1] &quot;We are started with reading the coverage files and bed files 2023-01-02 13:49:43&quot;
  
  Error in fread(fileName, header = F, stringsAsFactors = F, sep = &quot;\t&quot;) :
    File 'myfolder/myfileGCannotated.bed' does not exist or is non-readable. getwd()=='/root/ClinCNV'
  Calls: ReadFileFast -&gt; as.data.frame -&gt; fread
  Execution halted
  </code></pre>
  <p>Now I started the script with absolute paths and it works but I have a new problem:</p>
  <pre><code>Error in setnames(localDf &lt;- as.data.frame(fread(fileName, skip = 1, header = F,  :
    Can't assign 4 names to a 7 column data.table
  Calls: ReadFileFast -&gt; setnames
  Execution halted
  </code></pre>
   298: <p>The error message is telling you:</p>
  <blockquote>
  <p>&quot;We run script located in folder /root/myfolder . Please, specify ABSOLUTE paths, relative paths do not work for every machine. If everything crashes, please, check the correctness of this path first.&quot;</p>
  </blockquote>
  <p>So it sounds like you simply need to use absolute instead of relative paths. Something like this:</p>
  <pre><code>Rscript /home/yourUser/ClinCNV/clinCNV.R \
      --normal /home/yourUser/myfolder/myfile.cov \
      --out /home/yourUser/myfolder/ \
      --bed /home/yourUser/myfolder/myfileGCannotated.bed \
      --folderWithScript /home/yourUser/ClinCNV/
  </code></pre>
  <p>Also, don't run things as root unless absolutely necessary. if anything goes wrong or if any of your scripts or tools has a bug, you could end up breaking your machine if you run as root.</p>
  