Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

FastDTLmapper error caused by python2.7 dependency #66

Closed
moshi4 opened this issue Sep 3, 2022 · 12 comments
Closed

FastDTLmapper error caused by python2.7 dependency #66

moshi4 opened this issue Sep 3, 2022 · 12 comments

Comments

@moshi4
Copy link
Owner

moshi4 commented Sep 3, 2022

Dear moshi4,

I am Yuchun, an assistent professor in Sun Yat-sen University. I am trying to use FastDTLmapper for my data analysis, but an error was accured after I installed the software, even analyzed the provided example data. I have tried to install different version of FastDTLmapper, but it could not work. Could you please help me to solve this problem? Thanks

fastdtlmapper_error

Best wishes,

Yuchun

Received email on 2022/09/03 16:16

Hi, Yuchun (@Yuchunyang2022)

Thank you for your interest in FastDTLmapper.

The reason for the error is that you do not have python2.7 installed and AnGST, the tool to run DTL reconciliation, requires python2.7.
To run FastDTLmapper successfully, you will need to build an environment where python 2.X and python 3.X coexist, such as Ubuntu 20.04, although it will take a lot of work.

To save users the trouble of building an environment, I created a Docker image for running FastDTLmapper (See here).
Although knowledge of Docker is required, it is recommended to run FastDTLmapper on this Docker image environment.

@Yuchunyang2022
Copy link

Thanks, I got another error when analyzing my own data.
FileNotFoundError: [Errno 2] No such file or directory: 'amox_fastdtlmapper/02_dtl_reconciliation/OG0000000/treerecs/OG0000000_multifurcate.ufboot_recs.nwk'
I also checked the treerecs_log.csv, it said "Error during gene <> species mapping, some gene leaves cannot be mapped:"

@moshi4
Copy link
Owner Author

moshi4 commented Sep 4, 2022

Does the example data provided by the repository work correctly in your environment?

If the error occurs only with your data, it may be due to some unexpected special characters (symbols) in your input phylogenetic species tree OTU name or CDS fasta file.

Can you upload your input phylogenetic species tree and output 02_dtl_reconciliation/OG0000000/ folder here to investigate the cause of the error?

@moshi4
Copy link
Owner Author

moshi4 commented Sep 4, 2022

Hope to get your understanding that I canot update the file phylogenetic species tree and output 02_dtl_reconciliation/OG0000000/ folder to the Github for publication, because this is an unpublished work. Attached please see these two files. Thanks

Received email on 2022/09/04 11:53

Thank you for sending the data.

As I expected, the input file contained a special character symbol ($), which may be the cause of the error.

Your species phylogenetic tree file contains $ characters, and these special characters are sometimes automatically converted to _(underscore) by phylogenetic analysis tools (e.g. iqtree). This automatic conversion may prevent FastDTLmapper (treerecs) from mapping the species name to gene names, resulting in this error.

To resolve this error, please convert the $ characters to _ characters in your input species phylogenetic tree beforehand. You may also need to remove the ' (single quotation) from the species phylogenetic tree.
Also, convert the input Fasta or Genbank filename in the same way.

This should work without any problems. If you encounter any more problems, please let me know.

@moshi4
Copy link
Owner Author

moshi4 commented Sep 4, 2022

To resolve this error, please convert the $ characters to _ characters in your input species phylogenetic tree beforehand.

Sorry, converting $ to _ was not allowed. Please remove the $.

@Yuchunyang2022
Copy link

Hi, after I removed all the $ from the phylogenetic tree file and fasta file names, the process was stopped at Reconstruct each OG gene tree using IQ-TREE. It seems that iqtree could not work anymore, no other error was reported except FileNotFoundError: [Errno 2] No such file or directory: 'amox_fastdtlmapper/02_dtl_reconciliation/OG0002313/iqtree/OG0002313.treefile'

@moshi4
Copy link
Owner Author

moshi4 commented Sep 4, 2022

It may be that the input sequences contain data that are inconvenient for iqtree to generate a gene tree (e.g. too short CDS sequences, strange alignment results).

Sorry for the repeated errors, but could you please email me the contents of the folder 02_dtl_reconciliation/OG0002313?
If you send it to me, I will try to find out the cause.

@moshi4
Copy link
Owner Author

moshi4 commented Sep 4, 2022

Hi moshi4,

Thanks for the quick response, attached please find the folder.

Cheers,

Yuchun

Received email on 2022/09/04 19:54

I found the cause of the error.
As a conclusion, this error was caused by trimming the alignment length from 66 to 1 by trimal.

The OG0002313_aln_trim.fa you provided has the following result, and it seems that the error occurred in iqtree with this improper alignment result as input.

>gene01
F
>gene02
F
.
.
.
>geneXX
F

Since there is excessive trimming in this example, it seems more correct to use the pre-trimmed alignment.

I will try to release a FastDTLmapper with this bug fixed as soon as possible. I will let you know in this issue when it is released.

@Yuchunyang2022
Copy link

Yuchunyang2022 commented Sep 4, 2022 via email

@moshi4
Copy link
Owner Author

moshi4 commented Sep 4, 2022

Newly released v0.3.3 with bug fixes. Please try it to see if it works properly.

@moshi4
Copy link
Owner Author

moshi4 commented Sep 6, 2022

Hi,

Newly released v0.3.3 was used but an now error was occured "FileNotFoundError: [Errno 2] No such file or directory: 'Amox_fastdtlmapper/02_dtl_reconciliation/OG0000000/treerecs/OG0000000_multifurcate.ufboot_recs.nwk'"

Attached please find the OG0000000 folder

Received email on 2022/09/06 13:58

The error seems to occur because the treerecs used to resolve multifurcation of the gene tree is not outputting the results correctly by the following command.

treerecs -s Amox_fastdtlmapper/00_user_data/tree/ultrametric_tree.nwk \
         -g Amox_fastdtlmapper/02_dtl_reconciliation/OG0000000/treerecs/OG0000000_multifurcate.ufboot \
         -o Amox_fastdtlmapper/02_dtl_reconciliation/OG0000000/treerecs \
         --dupcost 2 --losscost 1 --output-without-description -f --quiet 2>&1

The cause of this error is that the name matching between the species tree and the gene tree is failing. However, I do not understand from the data you provided why this error is occurring. At least the gene tree appears to be outputting as expected.

Could you please provide the Amox_fastdtlmapper/00_user_data/tree/ folder where the species tree was output for further investigation?

@moshi4
Copy link
Owner Author

moshi4 commented Sep 6, 2022

Please find the attached tree file.

Received email on 2022/09/06 19:34

Thank you for quick reply.

The error is probably due to the inclusion of '(single quotation) in the species tree.
Remove '(single quotation) from the species tree and try again, as in the following example.

((('species01', 'species02'), 'species03'), 'species04');

(((species01, species02), species03), species04);

@Yuchunyang2022
Copy link

Hi, thanks for the great help, it works.

@moshi4 moshi4 closed this as completed Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants