Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue/bug getting root to tip variation #8

Open
crcardenas opened this issue Dec 4, 2023 · 0 comments
Open

issue/bug getting root to tip variation #8

crcardenas opened this issue Dec 4, 2023 · 0 comments

Comments

@crcardenas
Copy link

I have the following slurm script:

#!/bin/sh
#SBATCH --job-name=sorta_date           # job name
#SBATCH --mem=10000                     # 10 gb of ram
#SBATCH --ntasks=1                      # number of tasks
#SBATCH --cpus-per-task=1               # cores each task needs
#SBATCH --partition=public-cpu          # partition
#SBATCH --time=02:00:00                 # max two hours 

module load GCC/11.3.0 OpenMPI/4.1.4 phyx/1.3 Anaconda3

SD="SortaDate/src"
REROOT="rerooted/"
SPECIESTREE="noflank_parti-gene_30p.rr.treefile"

printf "get root to tip variation\n"
python ${SD}/get_var_length.py ${REROOT} --flend .rr.treefile --outf analysis/var --outg GCA905333025_gen,SRR2083676_tra,SRR921609_tra,SRR2083695_tra,SRR10334043_uce,SRR10334056_uce

# get bipartition support
printf "get bipartition support\n"
python ${SD}/get_bp_genetrees.py --flend .rr.treefile ${REROOT} ${SPECIESTREE} --outf analysis/bp

# get good genes
printf "combine_results\n"
python ${SD}/combine_results.py analysis/var analysis/bp --outf analysis/comb

# get good genes
printf "get good genes\n"
python ${SD}/get_good_genes.py analysis/comb --max 200 --order 3,1,2 --outf analysis/good_genes

Running it gives me a similar error to this closed topic.

$ cat slurm-6074476.out
get root to tip variation
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
Error: this really only works with nexus or newick. Exiting.
Error: this really only works with nexus or newick. Exiting.
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
Error: this really only works with nexus or newick. Exiting.
directory: rerooted
file ending for trees: .rr.treefile
outgroups: GCA905333025_gen,SRR2083676_tra,SRR921609_tra,SRR2083695_tra,SRR10334043_uce,SRR10334056_uce
phyx location: 
outfile: analysis/var
get bipartition support
directory: rerooted
file ending for trees: .rr.treefile
species tree: noflank_parti-gene_30p.rr.treefile
phyx location: 
outfile: analysis/bp
combine_results
outfile: analysis/comb
get good genes
order: bipartition root-to-tip variance treelength
outfile: analysis/good_genes
Traceback (most recent call last):
  File "/home/users/c/cardenac/phylo/2023_adephaga/SORTADATE/SortaDate/src/get_good_genes.py", line 41, in <module>
    tuples.append((spls[0],float(spls[1]),float(spls[2]),-float(spls[-1])))
IndexError: list index out of range

I looked at the var file, and indeed there are empty lines"

...
trimalauto_30p_ENSMPTG00005025653.rr.treefile	0.0205059	10.0266
trimalauto_30p_ENSMPTG00005027711.rr.treefile	0.0325183	17.8281
trimalauto_30p_uce194347.rr.treefile	0.0577492	12.7498
trimalauto_30p_ENSMPTG00005020600.rr.treefile		
trimalauto_30p_ENSMPTG00005022173.rr.treefile	0.0850962	40.1361
trimalauto_30p_ENSMPTG00005025359.rr.treefile	0.0842451	22.3873
...	

Trying to make a copy of the files in a new directory didn't help and returned a similar error. I checked the treefiles (newick format) and they look fine. I was able to successfully run it without indicating out groups. But I still need accurate variation... so I removed those trees from the run. ( for i in $(cat analysis/var | tr " " "\t" | awk '{if ($2=="") print;}'); do echo mv rerooted/${i} rerooted_removed/${i}; done)

However, there were still some warnings/errors in the slurm out file

get root to tip variation
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
free(): double free detected in tcache 2
directory: rerooted/
file ending for trees: .rr.treefile
outgroups: GCA905333025_gen,SRR2083676_tra,SRR921609_tra,SRR2083695_tra,SRR10334043_uce,SRR10334056_uce
phyx location: 
outfile: analysis/var
get bipartition support
directory: rerooted/
file ending for trees: .rr.treefile
species tree: noflank_parti-gene_30p.rr.treefile
phyx location: 
outfile: analysis/bp
combine_results
outfile: analysis/comb
get good genes
order: bipartition root-to-tip variance treelength
outfile: analysis/good_genes

So I am not sure if the fact I'm running phyx as a module on a slurm cluster is the problem.

I think it could be because I'm not sure how to indicate where phyx lives, but I loaded it as a module (the --loc parameter). Its in my paths ...:/opt/ebsofts/phyx/1.3-foss-2022a/bin:.... but just running a pxrr --help throws an error.

python /opt/ebsofts/phyx/1.3-foss-2022a/bin/pxrr --help
SyntaxError: Non-UTF-8 code starting with '\xd2' in file /opt/ebsofts/phyx/1.3-foss-2022a/bin/pxrr on line 2, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details

While, of course, without indicating the bin in my paths python pxrr --help works fine.

I would try running it on my computer, but I had an issue installing phyx....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant