nservant / HiC-Pro

HiC-Pro: An optimized and flexible pipeline for Hi-C data processing
Other
386 stars 182 forks source link

mapped_2hic_fragments.py #377

Closed Ferossitiziano closed 4 years ago

Ferossitiziano commented 4 years ago

Hi!

when running the script

python mapped_2hic_fragments.py -v -a -f mm10DpnII_digested -r bowtie_results/bwt2/WT/WT_genome.bwt2pairs.bam -o hic_results/data/WT

I get the following error:

Traceback (most recent call last):
  File "/hpcnfs/home/ieo5073/miniconda3/envs/HiCpro/bin/HiC-Pro_2.11.4/scripts/mapped_2hic_fragments.py", line 564, in <module>
    handle_valid = open(outputDir + '/' + baseReadsFile + '.validPairs', 'w')
IOError: [Errno 2] No such file or directory: 'hic_results/data/WT/WT_genome.bwt2pairs.validPairs'

I don't understand why the script requires me to have the WT_genome.bwt2pairs.validPairs, as that is among the files that the script should generate. Any advice? Thank you as always.

Federico

nservant commented 4 years ago

Hi Frederico,

When you say 'when running', it means that you run it by hand ? In HiC-Pro most of the path are relative. So it expects that the script was run from the HiC-pro output folder in order to write in ./hic_results/.... If the output folder does not exist, you will have this error message. N

Ferossitiziano commented 4 years ago

Hi!

yes, I was running it by hand as I had some memory issue with my lab server, I got through the memory issue now. I also solved the problem mentioned here above by creating the folder hic_results/data/WT/, and then running the script again.

Thank you for your help!

Federico