madagiurgiu25 / decoil-pre

Reconstruct ecDNA from long-read data using Decoil tool
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

An IsADirectoryError when generate summary.txt in the final step. #1

Closed Uigi1600 closed 7 months ago

Uigi1600 commented 7 months ago

This tool is really useful for ecDNA analysis by ont data and it's easy to use. However, i encountered an error when run with test data as showed in picture, and it seemed like an error in source code rather than my data. Could you offer a simple solution for this problem? Thanks!

截屏2023-12-05 10 49 57

By the way, would Decoil be available in conda or pip or python script in the future? It would be more convenient to use in the servers.

Uigi1600 commented 7 months ago

I check the output and anno.gtf and reference.fa file were renamed and became directory.

截屏2023-12-05 11 30 01
madagiurgiu25 commented 7 months ago

Hi @Uigi1600,

I rerun the test example in a separate folder and for me if finishes without errors, nor the reference.fa or anno.gtf are converted to folders.

Could you share with me the command which you used?

Also could you try in an empty folder these commands and confirm if its working for you?

# download annotation files
REFGENOME=reference.fa
GTFANNO=anno.gtf
wget -O - https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_44/GRCh38.primary_assembly.genome.fa.gz | gunzip -c > $REFGENOME
wget -O - https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_44/gencode.v44.primary_assembly.basic.annotation.gtf.gz | gunzip -c > $GTFANNO

# run decoil in `sv-reconstruct` mode
docker run -it --platform=linux/amd64 \
    -v $PWD/test3:/output \
    -v $PWD/$GTFANNO:/annotation/anno.gtf \
    -v $PWD/$REFGENOME:/annotation/reference.fa \
    -t madagiurgiu25/decoil:1.1.1-slim-test \
decoil -f sv-reconstruct \
    -b /examples/ecdna1/map.bam \
    -r /annotation/reference.fa \
    -g /annotation/anno.gtf \
    -o /output -n ecdna1

Best, Madalina

madagiurgiu25 commented 7 months ago

Hi @Uigi1600,

To your other question about pip and conda, yes I will work on this and feel free to open an issue in github with this. Thank you. Best, Madalina

Uigi1600 commented 7 months ago

Hi @Uigi1600,

I rerun the test example in a separate folder and for me if finishes without errors, nor the reference.fa or anno.gtf are converted to folders.

Could you share with me the command which you used?

Also could you try in an empty folder these commands and confirm if its working for you?

# download annotation files
REFGENOME=reference.fa
GTFANNO=anno.gtf
wget -O - https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_44/GRCh38.primary_assembly.genome.fa.gz | gunzip -c > $REFGENOME
wget -O - https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_44/gencode.v44.primary_assembly.basic.annotation.gtf.gz | gunzip -c > $GTFANNO

# run decoil in `sv-reconstruct` mode
docker run -it --platform=linux/amd64 \
    -v $PWD/test3:/output \
    -v $PWD/$GTFANNO:/annotation/anno.gtf \
    -v $PWD/$REFGENOME:/annotation/reference.fa \
    -t madagiurgiu25/decoil:1.1.1-slim-test \
decoil -f sv-reconstruct \
    -b /examples/ecdna1/map.bam \
    -r /annotation/reference.fa \
    -g /annotation/anno.gtf \
    -o /output -n ecdna1

Best, Madalina

I rerun the test code in new directory and finished without error. And when i rerun my data but change platform from iMAC-M1 to Windows-Ubuntu, the problem also solved. I suppose iMAC-M1 could not handle large data(>50Gb).

Thanks for your help!

madagiurgiu25 commented 7 months ago

Dear @Uigi1600 ,

Ok, these are great news!

I could, however reproduce your error, and it is important to set the env variables, i.e REFGENOME, ANNO, BAM_INPUT as absolute path, if these point to a file and not to folder.

In the example its true I defined REFGENOME=reference.fa, but then use -v $PWD/$REFGENOME:/annotation/reference.fa to mount the absolute file path.

madagiurgiu25 commented 7 months ago

Hi @Uigi1600

I rerun the test code in new directory and finished without error. And when i rerun my data but change platform from iMAC-M1 to Windows-Ubuntu, the problem also solved. I suppose iMAC-M1 could not handle large data(>50Gb).

You should also check on your Macbook the settings of docker container and increase the memory of your container to at least 4GB.

Screenshot 2023-12-08 at 14 11 49