bergmanlab / mcclintock

Meta-pipeline to identify transposable element insertions using next generation sequencing data
93 stars 30 forks source link

Issue running relocaTE2 #119

Closed motto7 closed 1 year ago

motto7 commented 1 year ago

Dear McClintock team,

First I would like to appreciate for developing this tool and make it easier to analyze TE.

I am running relocaTE2 following your guides with your test data, However, I encountered error In relocaTE2 step.

I've tried it in two different environment, and It cannot import pysam in both case. below is the errors.

environment 1)

Traceback (most recent call last):
  File "/disk7/14.Jaehoon_starfish_additional/Program/mcclintock/install/tools/relocate2/scripts/relocaTE_trim.py", line 8, in <module>
    import pysam
  File "/home/jaehoon/.local/lib/python2.7/site-packages/pysam/__init__.py", line 4, in <module>
    from pysam.libchtslib import *
ImportError: /disk7/14.Jaehoon_starfish_additional/Program/mcclintock/install/envs/conda/5cf0e2f7/bin/../lib/libssl.so.1.1: symbol EVP_idea_cbc version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference.

environment 2)

job: sh /data11/5.Ppectinifera_Annotation_210511/10.test/mcclintock/test_output/SRR800842_1/results/relocate2/unfiltered/shellscripts/step_2/1.fq2fa.sh
Traceback (most recent call last):
  File "/data11/5.Ppectinifera_Annotation_210511/10.test/mcclintock/install/tools/relocate2/scripts/relocaTE_trim.py", line 9, in <module>
    import pysam
  File "/home/star/.local/lib/python2.7/site-packages/pysam/__init__.py", line 5, in <module>
    from pysam.libchtslib import *
ImportError: /home/star/.local/lib/python2.7/site-packages/pysam/libchtslib.so: undefined symbol: PyUnicodeUCS2_FromStringAndSize

First I thought that it is because of python2 issue, so I imported pysam in python2 separately, and it works well.

Second, I've changed shebang of scripts/relocaTE_trim.py file to replace python2 to differently-configured one, but it didn't work.

Is there any solution to solve this?

cbergman commented 1 year ago

Hi @motto7

Thanks for your issue report. Can you please tell us what operating system and version you are using? Also, can you confirm whether conda/mamba was installed using the instructions here (https://github.com/bergmanlab/mcclintock#-installing-condamamba), or whether it was installed another way? Finally, can you confirm that you installed the McClintock 2 system following the instructions here: https://github.com/bergmanlab/mcclintock#-installing-mcclintock?

Many thanks, Casey

motto7 commented 1 year ago
cbergman commented 1 year ago

Thanks. Just to be clear, did you follow the mambaforge installation notes here: https://github.com/conda-forge/miniforge#install?

Also, did you do an update to conda prior to installing McClintock? e.g.

mamba update -y conda

I have just done a clean install using the mambaforge mamba installation on CentOS Linux release 7.9.2009 (Core) and run the test data with no problems as follows:

CONDA_BASE=$(conda info --base)
source ${CONDA_BASE}/etc/profile.d/conda.sh
conda activate mcclintock

cd $HOME/github/mcclintock

python3 mcclintock.py \
    -r test/sacCer2.fasta \
    -c test/sac_cer_TE_seqs.fasta \
    -g test/reference_TE_locations.gff \
    -t test/sac_cer_te_families.tsv \
    -1 test/SRR800842_1.fastq.gz \
    -2 test/SRR800842_2.fastq.gz \
    -p 28 \
    -o /scratch/$USER/mcc_test

I will try to replicate on Ubuntu linux (18.04.1) but if I am not able to replicate the error on my side, I suggest uninstalling mamba/conda/mcclintock and doing a clean install of mamba, update conda, then doing a clean install of mcclintock, and keeping a record of the exact input and output. If you still see the same issue, please send me a log of your commands and output and I'll look into it further. There should be no need to modify any of the conda environments or Relocate2 code.

Thanks, Casey

motto7 commented 1 year ago

Thanks for your help.

I totally updated mamba / conda / or everything... but it didn't help.

And I found that pysam that is newly installed with Mcclintock install pipeline is not compatible with my server's python2. So I removed that version and used already-installed pysam in root, and it worked well.

cbergman commented 1 year ago

Hi @motto7

Thanks for the update. This is a bit strange since once you install and activate the main McClintock and component method environments, you should be using python from the installed environment, not your system python2. This is strange because the conda activate command should put the environment path before your default login path. I wonder if there is something in your .bash_profile or .bashrc that is is putting your system path before the environment path? In any event, since you seem to have solved this issue, I will close for now.

Best regards, Casey