GuipengLi / ChIA-PET2

a versatile and flexible pipeline for analysing different variants of ChIA-PET data
GNU General Public License v3.0
34 stars 19 forks source link

Unable to start CPT2 #11

Open IoannisVardaxis opened 6 years ago

IoannisVardaxis commented 6 years ago

Hey,

I just installed CPT2 on my system (mac high sierra) and I tried to run ti using the command that you have as an example: ChIA-PET2 -g genomeindex -b bedtoolsgenome -f fq1 -r fq2 -A linkerA -B linkerB -o OUTdir -n prefixname

Where my variables are specified accordingly. However when I run this I only get the following output:

usage : ChIA-PET2 -g genomeindex -b bedtoolsgenome -f fq1 -r fq2 -A linkerA -B linkerB -o OUTdir -n prefixname Use option -h|--help for more information

And the program is not running. It does not return any error message, it just prints the above output all the time.

What is the issue?

Thanks

GuipengLi commented 6 years ago

Could you provide the exact command and the output? Otherwise I can not tell what issue it is.

IoannisVardaxis commented 6 years ago

The following is what I run: "/Users/vardaxis/bin/ChIA-PET2_0.9.3/bin/ChIA-PET2 --start 1 --genome /Volumes/EksternDrive/GenomeIndecesFASTA/hg19/chromFa/hg19.fa --bedtoolsgenome /Volumes/EksternDrive/Analyse/Other_files/Other/hg19.genome --output /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/CPT2_Complete --name CPT2 --mode 0 --err 0 --thread 3 --short 1 --macs2 -q 0.05 --mapq 30 --cutoffPET 2 --slop 100 --extend 500 --length 15 --forward /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/fastq.files/ENCFF000KZA1.fastq.gz --reverse /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/fastq.files/ENCFF000KZI2.fastq.gz --linkerA GTTGGATCAT --linkerB GTTGGATCCG --keepempty 2" And I get:

/Users/vardaxis/bin/ChIA-PET2_0.9.3/bin/ChIA-PET2: illegal option -- - Invalid option: - usage : ChIA-PET2 -g genomeindex -b bedtoolsgenome -f fq1 -r fq2 -A linkerA -B linkerB -o OUTdir -n prefixname Use option -h|--help for more information

GuipengLi commented 6 years ago

Thanks for pointing this out.

You can use '-n' instead of '--name', or you can install the updated one in github. I have fixed this bug. There is a typo and I correct 'nmae' to 'name', now it should work.

Another problem is that there should be double quotations for macs2 parameters after --macs2 option, e.g. --macs2 "-q 0.05"

IoannisVardaxis commented 6 years ago

I did as you suggested but I still get the same error:

"ChIA-PET2 --start 1 --genome /Volumes/EksternDrive/GenomeIndecesFASTA/hg19/chromFa/hg19.fa --bedtoolsgenome /Volumes/EksternDrive/Analyse/Other_files/Other/hg19.genome --output /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/CPT2_Complete --name CPT2 --mode 0 --err 0 --thread 3 --short 1 --mapq 30 --macs2 \"-q 0.05\" --cutoffPET 2 --slop 100 --extend 500 --length 15 --forward /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/fastq.files/ENCFF000KZA1.fastq.gz --reverse /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/fastq.files/ENCFF000KZI2.fastq.gz --linkerA GTTGGATCAT --linkerB GTTGGATCCG --keepempty 2"

Even if I dont use the --macs2 (since I also use the default value) I still get the same error. Maybe the problem is that I am on macos? I know there is a problem installing the package in macos because of the openMP problem but I managed to install it using Coda. So I dont think the problem is there.

GuipengLi commented 6 years ago

I fixed another bug and updated it in github. The problem is due to long name parameters. Previous version can not recognize the "--start" option. Now it should work.

[guipeng@compute-0-6 ~]$ ChIA-PET2 --start 1 --genome /Volumes/EksternDrive/GenomeIndecesFASTA/hg19/chromFa/hg19.fa --bedtoolsgenome /Volumes/EksternDrive/Analyse/Other_files/Other/hg19.genome --output /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/CPT2_Complete --name CPT2 --mode 0 --err 0 --thread 3 --short 1 --mapq 30 --macs2 "-q 0.05" --cutoffPET 2 --slop 100 --extend 500 --length 15 --forward /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/fastq.files/ENCFF000KZA1.fastq.gz --reverse /Volumes/EksternDrive/Analyse/ChIA_PET_Data/Experiment_ENCSR000BZZ/REP1/fastq.files/ENCFF000KZI2.fastq.gz --linkerA GTTGGATCAT --linkerB GTTGGATCCG --keepempty 2 chromosome size file requred for bedtools. usage : ChIA-PET2 -g genomeindex -b bedtoolsgenome -f fq1 -r fq2 -A linkerA -B linkerB -o OUTdir -n prefixname Use option -h|--help for more information [guipeng@compute-0-6 ~]$

IoannisVardaxis commented 6 years ago

Hei,

Thanks! Now it starts at least, but I get an error that the trimLinkers function is not found:

/Users/vardaxis/bin/ChIA-PET2_0.9.3/bin/utils: line 23: trimLinker: command not found Warning message: In system(command) : error in running command

Which means that it cannot find the function, however I have added the bin folder to the PATH as suggested, I did:

export PATH="/Users/vardaxis/bin/ChIA-PET2_0.9.3/bin:$PATH"

and

echo $PATH

shows me that the path is there.

GuipengLi commented 6 years ago

You can check what files are there in the path "/Users/vardaxis/bin/ChIA-PET2_0.9.3/bin". If trimLinkers does no exists, then it should be the installation problem.

IoannisVardaxis commented 6 years ago

All the necessary files are in the /bin directory and if I run trimLinkers separately it runs ok. But when I run the ChIA-PET2 script it does not find it.

GuipengLi commented 6 years ago

Could you type "which ChIA-PET2"?

IoannisVardaxis commented 6 years ago

I get: /Users/vardaxis/bin/ChIA-PET2_0.9.3/bin/ChIA-PET2