cytham / nanovar

Structural variant caller for low-depth long-read sequencing data
GNU General Public License v3.0
44 stars 10 forks source link

AttributeError: 'str' object has no attribute 'decode' #28

Closed gchevignon closed 3 years ago

gchevignon commented 3 years ago

Hello I got this error :

nanovar -x ont -l 1000 -t 10 wocg_10_longest_MD_CIGAR.bam.sort.bam oshv1-microVAR2.fasta 05-nanovar.dir/ [03/06/2021 15:49:19] - NanoVar started Checking integrity of input files - / Indexing genome and aligning reads - \ Analyzing read alignments and detecting SVs - //home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/lib/python3.7/site-packages/nanovar/nv_cov_upper.py:141: UserWarning: FixedFormatter should only be used together with FixedLocator ax.set_yticklabels(['{:,.1%}'.format(x) for x in vals]) Analyzing read alignments and detecting SVs - \ Clustering SV breakends and inferencing - \ Re-evaluating INS and INV SVs - -Traceback (most recent call last): File "/home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/bin/nanovar", line 452, in main() File "/home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/bin/nanovar", line 321, in main run.cluster_nn(add_out=sub_run.total_out) File "/home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/lib/python3.7/site-packages/nanovar/nv_characterize.py", line 125, in cluster_nn self.out_nn = inference(new_cluster_out, new_total_out, self.model) File "/home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/lib/python3.7/site-packages/nanovar/nv_nn.py", line 40, in inference Re-evaluating INS and INV SVs - \ nnmodel = load_model(model, compile=False) File "/home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/save.py", line 146, in load_model return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile) File "/home1/datawork/gchevign/Soft.dir/nanovar-1.3.9/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/hdf5_format.py", line 166, in load_model_from_hdf5 model_config = json.loads(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode'

cytham commented 3 years ago

Hi @gchevignon, can you do a pip freeze and show me the output? Please do it in the environment where NanoVar is installed.

Thanks

gchevignon commented 3 years ago

Here you go : absl-py @ file:///tmp/build/80754af9/absl-py_1615411205513/work astor==0.8.1 biopython @ file:///tmp/build/80754af9/biopython_1600298863563/work cached-property @ file:///tmp/build/80754af9/cached-property_1600785575025/work certifi==2021.5.30 coverage @ file:///tmp/build/80754af9/coverage_1614614864940/work cycler==0.10.0 Cython @ file:///tmp/build/80754af9/cython_1618432038002/work gast==0.2.2 google-pasta==0.2.0 grpcio @ file:///tmp/build/80754af9/grpcio_1614883945333/work h5py @ file:///tmp/build/80754af9/h5py_1622088444809/work importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1617877314848/work Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work Keras-Preprocessing @ file:///tmp/build/80754af9/keras-preprocessing_1612283640596/work kiwisolver @ file:///tmp/build/80754af9/kiwisolver_1612282414123/work Markdown @ file:///tmp/build/80754af9/markdown_1614363832606/work matplotlib @ file:///tmp/build/80754af9/matplotlib-suite_1613407855456/work mkl-fft==1.3.0 mkl-random @ file:///tmp/build/80754af9/mkl_random_1618853974840/work mkl-service==2.3.0 nanovar==1.3.2 natsort @ file:///tmp/build/80754af9/natsort_1611692802956/work numpy @ file:///tmp/build/80754af9/numpy_and_numpy_base_1620831194891/work olefile==0.46 opt-einsum @ file:///tmp/build/80754af9/opt_einsum_1621500238896/work pandas==1.2.4 Pillow @ file:///tmp/build/80754af9/pillow_1617386154241/work progress @ file:///tmp/build/80754af9/progress_1614270514501/work protobuf==3.14.0 pybedtools==0.8.1 pyparsing @ file:///home/linux1/recipes/ci/pyparsing_1610983426697/work pysam==0.15.3 python-dateutil @ file:///home/ktietz/src/ci/python-dateutil_1611928101742/work pytz @ file:///tmp/build/80754af9/pytz_1612215392582/work scipy @ file:///tmp/build/80754af9/scipy_1618852618548/work six @ file:///tmp/build/80754af9/six_1605205313296/work tensorboard==2.0.0 tensorflow==2.0.0 tensorflow-estimator @ file:///home/builder/ktietz/aggregate/tensorflow_recipes/ci_baze37/tensorflow-estimator_1622026529081/work/tensorflow_estimator-2.5.0-py2.py3-none-any.whl termcolor==1.1.0 tornado @ file:///tmp/build/80754af9/tornado_1606942283357/work typing-extensions @ file:///home/ktietz/src/ci_mi/typing_extensions_1612808209620/work Werkzeug==0.16.1 wrapt==1.12.1 zipp @ file:///tmp/build/80754af9/zipp_1615904174917/work

cytham commented 3 years ago

Thanks, can you please install the latest version of NanoVar (v1.3.9) and try running again?

gchevignon commented 3 years ago

This is weird because I have installed nanovar yesterday with conda .... why conda did not install the last version ? Thanks

cytham commented 3 years ago

I see. I do not know why conda does that sometimes. Can you try with conda install -c bioconda nanovar=1.3.9?

gchevignon commented 3 years ago

conda install -c bioconda nanovar=1.3.9 Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: - Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError:

cytham commented 3 years ago

May I know what is your conda version? Try conda --version

cytham commented 3 years ago

Are you using a new conda environment for NanoVar installation?

gchevignon commented 3 years ago

conda 4.10.1

gchevignon commented 3 years ago

"conda install -c bioconda nanovar" is working but it install nanovar-1.3.2 (bioconda/linux-64::nanovar-1.3.2-py37h516909a_0)

cytham commented 3 years ago

May I know if you are using a newly created conda environment for the NanoVar installation?

gchevignon commented 3 years ago

Yes I create a new one (i think so)

conda create -p nanovar-test conda activate nanovar-test/ conda install -c bioconda nanovar=1.3.9 # not working conda install -c bioconda nanovar # working but with v1.3.2

cytham commented 3 years ago

what is your python version in the environment? can you do python --version and which python please

can you also try to create the environment this way instead

conda create -n nanovar-test2 python=3.8
conda activate nanovar-test2
conda install -c bioconda nanovar=1.3.9

Thanks

gchevignon commented 3 years ago

python --version Python 3.7.10 which python /home1/datawork/gchevign/Soft.dir/nanovar-test/bin/python

After conda create -n nanovar-test2 python=3.8 conda activate nanovar-test2

conda install -c bioconda nanovar=1.3.9 Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: - Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

cytham commented 3 years ago

Thanks for trying it out.

Please try these in the specific order:

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

and try installing nanovar v1.3.9 again

gchevignon commented 3 years ago

OK install working But I got a Segmentation fault (I am on a node with 400G ram) nanovar -x ont -t 20 wocg_10_longest_MD_CIGAR.bam.sort.bam oshv1-microVAR2.fasta 05-nanovar.dir/ [04/06/2021 15:53:25] - NanoVar started Checking integrity of input files - \ Indexing genome and aligning reads - \ Analyzing read alignments and detecting SVs - \ Clustering SV breakends - - Re-evaluating SVs with BLAST and inferencing - |Segmentation fault

cytham commented 3 years ago

Can you send me the log file for this run? thanks

gchevignon commented 3 years ago

[04/06/2021 15:53:25] - INFO - Initialize NanoVar log file [04/06/2021 15:53:25] - INFO - Version: NanoVar-1.3.9 [04/06/2021 15:53:25] - INFO - Command: /home1/datawork/gchevign/Soft.dir/nanovar-test2/bin/nanovar -x ont -t 20 wocg_10_longest_MD_CIGAR.bam.sort.bam oshv1-microVAR2.fasta 05-n anovar.dir/ [04/06/2021 15:53:25] - INFO - Input file: wocg_10_longest_MD_CIGAR.bam.sort.bam [04/06/2021 15:53:25] - INFO - Read type: ont [04/06/2021 15:53:25] - INFO - Reference genome: oshv1-microVAR2.fasta [04/06/2021 15:53:25] - INFO - Working directory: 05-nanovar.dir/ [04/06/2021 15:53:25] - INFO - Model: /home1/datawork/gchevign/Soft.dir/nanovar-test2/lib/python3.8/site-packages/nanovar/model/ANN.E100B400L3N12-5D0.4-0.2SGDsee11_het_gup_v1.h5 [04/06/2021 15:53:25] - INFO - Filter file: None [04/06/2021 15:53:25] - INFO - Minimum number of reads for calling a breakend: 2 [04/06/2021 15:53:25] - INFO - Minimum SV len: 25 [04/06/2021 15:53:25] - INFO - Mapping percent for split-read: 0.05 [04/06/2021 15:53:25] - INFO - Length buffer for clustering: 50 [04/06/2021 15:53:25] - INFO - Score threshold: 1.0 [04/06/2021 15:53:25] - INFO - Homozygous read ratio threshold: 0.75 [04/06/2021 15:53:25] - INFO - Heterozygous read ratio threshold: 0.35 [04/06/2021 15:53:25] - INFO - Number of threads: 20

[04/06/2021 15:53:25] - INFO - Total number of reads in FASTQ/FASTA: -

[04/06/2021 15:53:25] - INFO - NanoVar started [04/06/2021 15:53:26] - INFO - Input BAM file, skipping minimap2 alignment [04/06/2021 15:53:32] - DEBUG - Falling back to TensorFlow client; we recommended you install the Cloud TPU client directly with pip install cloud-tpu-client. [04/06/2021 15:53:35] - DEBUG - Creating converter from 7 to 5 [04/06/2021 15:53:35] - DEBUG - Creating converter from 5 to 7 [04/06/2021 15:53:35] - DEBUG - Creating converter from 7 to 5 [04/06/2021 15:53:35] - DEBUG - Creating converter from 5 to 7 [04/06/2021 15:53:46] - INFO - Parsing BAM and detecting SVs [04/06/2021 15:54:03] - INFO - Gap dictionary not loaded. [04/06/2021 15:59:36] - INFO - Genome size: 204886 bases [04/06/2021 15:59:36] - INFO - Mapped bases: 442656584 bases [04/06/2021 15:59:36] - INFO - Depth of coverage: 2160.5x [04/06/2021 15:59:36] - INFO - Read overlap upper limit: 4683.9

[04/06/2021 15:59:36] - INFO - Total number of mapped reads: 42845

[04/06/2021 15:59:36] - INFO - Clustering SV breakends [04/06/2021 15:59:36] - INFO - Filtering INS and INV SVs [04/06/2021 15:59:37] - DEBUG - Make blast index skipped [04/06/2021 15:59:37] - DEBUG - Windowmasker counts skipped [04/06/2021 15:59:37] - DEBUG - Windowmasker obinary skipped [04/06/2021 15:59:37] - DEBUG - Make hs-blastn FMD-index skipped [04/06/2021 15:59:38] - DEBUG - [HS-BLASTN] Loading database. [04/06/2021 15:59:38] - DEBUG - Loading oshv1-microVAR2.fasta.sequence, size = 0.0002GB [04/06/2021 15:59:38] - DEBUG - Loading oshv1-microVAR2.fasta.bwt, size = 0.4GB [04/06/2021 15:59:38] - DEBUG - Loading oshv1-microVAR2.fasta.sa, size = 0.0004GB [04/06/2021 15:59:39] - DEBUG - [HS-BLASTN] done. Time elapsed: 0.99 secs. [04/06/2021 15:59:39] - DEBUG - [HS-BLASTN] Processing 05-nanovar.dir/temp2.fa. [04/06/2021 15:59:43] - DEBUG - Processing 73401 queries. [04/06/2021 16:01:28] - DEBUG - [HS-BLASTN] done. Elpased time: 109.7368 secs. [04/06/2021 16:01:28] - DEBUG - [HS-BLASTN] 73401 queries processed. [04/06/2021 16:01:28] - DEBUG - [CMD] hs-blastn align -db oshv1-microVAR2.fasta -window_masker_db 05-nanovar.dir/oshv1-microVAR2.counts.obinary -query 05-nanovar.dir/temp2.fa -o ut 05-nanovar.dir/temp-oshv1-microVAR2-blast.tab -outfmt 6 -num_threads 19 -max_target_seqs 3 -gapopen 0 -gapextend 4 -penalty -3 -reward 2 [04/06/2021 16:01:28] - INFO - Gap dictionary not loaded. [04/06/2021 16:01:30] - INFO - Parsing BAM and detecting INV and INS SVs [04/06/2021 16:01:30] - INFO - Re-clustering INS/INV SVs and merging [04/06/2021 16:02:43] - INFO - Neural network inference [04/06/2021 16:02:43] - DEBUG - Creating converter from 3 to 5

cytham commented 3 years ago

The log looks fine. I guess it might be a problem with Tensorflow.

Can you try these line by line in python and see if you get any error?

from tensorflow.keras.models import load_model
nnmodel = load_model('/home1/datawork/gchevign/Soft.dir/nanovar-test2/lib/python3.8/site-packages/nanovar/model/ANN.E100B400L3N12-5D0.4-0.2SGDsee11_het_gup_v1.h5', compile=False)

thanks

gchevignon commented 3 years ago

python Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. readline: /etc/inputrc: line 19: term: unknown variable name readline: /etc/inputrc: line 19: term: unknown variable name

from tensorflow.keras.models import load_model nnmodel = load_model('/home1/datawork/gchevign/Soft.dir/nanovar-test2/lib/python3.8/site-packages/nanovar/model/ANN.E100B400L3N12-5D0.4-0.2SGDsee11_het_gup_v1.h5', compile=False) 2021-06-04 17:06:36.848655: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. Segmentation fault

cytham commented 3 years ago

Thanks

Can you please show me details of your machine and OS?

lsb_release -a
uname -m

Thanks

gchevignon commented 3 years ago

lsb_release -a LSB Version: n/a Distributor ID: SUSE LINUX Description: SUSE Linux Enterprise Server 12 SP1 Release: 12.1 Codename: n/a uname -m x86_64

cytham commented 3 years ago

can you try reinstalling tensorflow by: pip install --upgrade tensorflow and then do the test above again

Thanks

gchevignon commented 3 years ago

I can't do this by my self on the cluster I use ... I'll ask the admin for this Thanks

cytham commented 3 years ago

can you do it in your nanovar-test environment?

gchevignon commented 3 years ago

OK I did it ! nanovar is running ...

cytham commented 3 years ago

that's great!

gchevignon commented 3 years ago

not yet ... nanovar -x ont -t 20 wocg_10_longest_MD_CIGAR.bam.sort.bam oshv1-microVAR2.fasta 05-nanovar.dir/ [04/06/2021 18:20:25] - NanoVar started Checking integrity of input files - \ Indexing genome and aligning reads - \ Analyzing read alignments and detecting SVs - \ Clustering SV breakends - | Re-evaluating SVs with BLAST and inferencing - | Generating VCF files and report - |Segmentation fault

gchevignon commented 3 years ago

[04/06/2021 18:20:25] - INFO - Initialize NanoVar log file [04/06/2021 18:20:25] - INFO - Version: NanoVar-1.3.9 [04/06/2021 18:20:25] - INFO - Command: /home1/datawork/gchevign/Soft.dir/nanovar-test2/bin/nanovar -x ont -t 20 wocg_10_longest_MD_CIGAR.bam.sort.bam oshv1-microVAR2.fasta 05-n anovar.dir/ [04/06/2021 18:20:25] - INFO - Input file: wocg_10_longest_MD_CIGAR.bam.sort.bam [04/06/2021 18:20:25] - INFO - Read type: ont [04/06/2021 18:20:25] - INFO - Reference genome: oshv1-microVAR2.fasta [04/06/2021 18:20:25] - INFO - Working directory: 05-nanovar.dir/ [04/06/2021 18:20:25] - INFO - Model: /home1/datawork/gchevign/Soft.dir/nanovar-test2/lib/python3.8/site-packages/nanovar/model/ANN.E100B400L3N12-5D0.4-0.2SGDsee11_het_gup_v1.h5 [04/06/2021 18:20:25] - INFO - Filter file: None [04/06/2021 18:20:25] - INFO - Minimum number of reads for calling a breakend: 2 [04/06/2021 18:20:25] - INFO - Minimum SV len: 25 [04/06/2021 18:20:25] - INFO - Mapping percent for split-read: 0.05 [04/06/2021 18:20:25] - INFO - Length buffer for clustering: 50 [04/06/2021 18:20:25] - INFO - Score threshold: 1.0 [04/06/2021 18:20:25] - INFO - Homozygous read ratio threshold: 0.75 [04/06/2021 18:20:25] - INFO - Heterozygous read ratio threshold: 0.35 [04/06/2021 18:20:25] - INFO - Number of threads: 20

[04/06/2021 18:20:25] - INFO - Total number of reads in FASTQ/FASTA: -

[04/06/2021 18:20:25] - INFO - NanoVar started [04/06/2021 18:20:28] - INFO - Input BAM file, skipping minimap2 alignment [04/06/2021 18:20:40] - DEBUG - Falling back to TensorFlow client; we recommended you install the Cloud TPU client directly with pip install cloud-tpu-client. [04/06/2021 18:20:44] - DEBUG - Creating converter from 7 to 5 [04/06/2021 18:20:44] - DEBUG - Creating converter from 5 to 7 [04/06/2021 18:20:44] - DEBUG - Creating converter from 7 to 5 [04/06/2021 18:20:44] - DEBUG - Creating converter from 5 to 7 [04/06/2021 18:20:56] - INFO - Parsing BAM and detecting SVs [04/06/2021 18:21:13] - INFO - Gap dictionary not loaded. [04/06/2021 18:26:45] - INFO - Genome size: 204886 bases [04/06/2021 18:26:45] - INFO - Mapped bases: 442656584 bases [04/06/2021 18:26:45] - INFO - Depth of coverage: 2160.5x [04/06/2021 18:26:45] - INFO - Read overlap upper limit: 4683.9

[04/06/2021 18:26:45] - INFO - Total number of mapped reads: 42845

[04/06/2021 18:26:45] - INFO - Clustering SV breakends [04/06/2021 18:26:45] - INFO - Filtering INS and INV SVs [04/06/2021 18:26:47] - DEBUG - Make blast index skipped [04/06/2021 18:26:47] - DEBUG - Windowmasker counts skipped [04/06/2021 18:26:47] - DEBUG - Windowmasker obinary skipped [04/06/2021 18:26:47] - DEBUG - Make hs-blastn FMD-index skipped [04/06/2021 18:26:47] - DEBUG - [HS-BLASTN] Loading database. [04/06/2021 18:26:47] - DEBUG - Loading oshv1-microVAR2.fasta.sequence, size = 0.0002GB [04/06/2021 18:26:47] - DEBUG - Loading oshv1-microVAR2.fasta.bwt, size = 0.4GB [04/06/2021 18:26:48] - DEBUG - Loading oshv1-microVAR2.fasta.sa, size = 0.0004GB [04/06/2021 18:26:48] - DEBUG - [HS-BLASTN] done. Time elapsed: 1.13 secs. [04/06/2021 18:26:48] - DEBUG - [HS-BLASTN] Processing 05-nanovar.dir/temp2.fa. [04/06/2021 18:26:53] - DEBUG - Processing 73401 queries. [04/06/2021 18:28:37] - DEBUG - [HS-BLASTN] done. Elpased time: 109.1073 secs. [04/06/2021 18:28:37] - DEBUG - [HS-BLASTN] 73401 queries processed. [04/06/2021 18:28:37] - DEBUG - [CMD] hs-blastn align -db oshv1-microVAR2.fasta -window_masker_db 05-nanovar.dir/oshv1-microVAR2.counts.obinary -query 05-nanovar.dir/temp2.fa -o ut 05-nanovar.dir/temp-oshv1-microVAR2-blast.tab -outfmt 6 -num_threads 19 -max_target_seqs 3 -gapopen 0 -gapextend 4 -penalty -3 -reward 2 [04/06/2021 18:28:37] - INFO - Gap dictionary not loaded. [04/06/2021 18:28:39] - INFO - Parsing BAM and detecting INV and INS SVs [04/06/2021 18:28:39] - INFO - Re-clustering INS/INV SVs and merging [04/06/2021 18:29:50] - INFO - Neural network inference [04/06/2021 18:29:50] - DEBUG - Creating converter from 3 to 5 [04/06/2021 18:29:56] - INFO - Creating VCF [04/06/2021 18:29:56] - INFO - Creating HTML report

cytham commented 3 years ago

Can you please run the following in python and let me know the error:

from nanovar.nv_report import create_report
create_report("05-nanovar.dir/", [1,2,3], 1, "./read.fa", "./ref.fa", {"read1": 1000, "read2": 2000}, "wocg_10_longest_MD_CIGAR.bam.sort", 10, 1)
gchevignon commented 3 years ago

Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. readline: /etc/inputrc: line 19: term: unknown variable name readline: /etc/inputrc: line 19: term: unknown variable name

from nanovar.nv_report import create_report create_report("05-nanovar.dir/", [1,2,3], 1, "./read.fa", "./ref.fa", {"read1": 1000, "read2": 2000}, "wocg_10_longest_MD_CIGAR.bam.sort", 10, 1) Traceback (most recent call last): File "", line 1, in File "/home1/datawork/gchevign/Soft.dir/nanovar-test2/lib/python3.8/site-packages/nanovar/nv_report.py", line 45, in create_report vcf_data = open(vcf_path, 'r').read().splitlines() FileNotFoundError: [Errno 2] No such file or directory: '05-nanovar.dir/wocg_10_longest_MD_CIGAR.bam.sort.nanovar.total.vcf'

cytham commented 3 years ago

my mistake, can you please replace "05-nanovar.dir/" with the PATH to your NanoVar working directory?

gchevignon commented 3 years ago

I run this in my nanovar environment in python:

from nanovar.nv_report import create_report create_report("/home1/datawork/gchevign/ONT_oshv1_7_kits.dir/05-nanovar.dir/", [1,2,3], 1, "./read.fa", "./ref.fa", {"read1": 1000, "read2": 2000}, "wocg_10_longest_MD_CIGAR.bam.sort", 10, 1)

I got no error and the wocg_10_longest_MD_CIGAR.bam.sort.nanovar.pass.report.html has been made !

So to conclude all the problems came from my side ?

cytham commented 3 years ago

The HTML report you just made is a dummy report (It does not contain any useful information). Its successful run means that there is no problem with the "Creating HTML report" stage. Hence, I am unsure of what caused the segmentation fault at the end.

May I know how many chromosomes are there in your reference file?

gchevignon commented 3 years ago

Only one ~200kb it's an herpes virus

cytham commented 3 years ago

Perhaps you can try the following which generates a larger and more realistic HTML file:

from nanovar.nv_report import create_report
create_report("/home1/datawork/gchevign/ONT_oshv1_7_kits.dir/05-nanovar.dir/", [1], 1, "./read.fa", "./ref.fa", {"read1": 1000, "read2": 2000}, "wocg_10_longest_MD_CIGAR.bam.sort", 1000, 1)

Thanks

gchevignon commented 3 years ago

from nanovar.nv_report import create_report create_report("/home1/datawork/gchevign/ONT_oshv1_7_kits.dir/05-nanovar.dir/", [1], 1, "./read.fa", "./ref.fa", {"read1": 1000, "read2": 2000}, "wocg_10_longest_MD_CIGAR.bam.sort", 1000, 1) Guidelines. Assignees No one assigned Labels None yet Projects None yet Milestone No milestone Linked pull requests Successfully merging a pull request may close this issue.

None yet Notifications Customize You’re receiving notifications because you were mentioned. 2 participants @cytham @gchevignon>>> Thanks Traceback (most recent call last): File "", line 1, in NameError: name 'Thanks' is not defined

@gchevignon ... File "", line 2

^

SyntaxError: invalid syntax

Leave a comment File "", line 1 Leave a comment ^ SyntaxError: invalid syntax Aucun fichier choisi File "", line 1 Aucun fichier choisi ^ SyntaxError: invalid syntax Attach files by dragging & dropping, selecting or pasting them. File "", line 1 Attach files by dragging & dropping, selecting or pasting them. ^ SyntaxError: invalid syntax Remember, contributions to this repository should follow our GitHub Community Guidelines. File "", line 1 Remember, contributions to this repository should follow our GitHub Community Guidelines. ^ SyntaxError: invalid syntax Assignees Traceback (most recent call last): File "", line 1, in NameError: name 'Assignees' is not defined No one assigned File "", line 1 No one assigned ^ SyntaxError: invalid syntax Labels Traceback (most recent call last): File "", line 1, in NameError: name 'Labels' is not defined None yet File "", line 1 None yet ^ SyntaxError: invalid syntax Projects Traceback (most recent call last): File "", line 1, in NameError: name 'Projects' is not defined None yet File "", line 1 None yet ^ SyntaxError: invalid syntax Milestone Traceback (most recent call last): File "", line 1, in NameError: name 'Milestone' is not defined No milestone File "", line 1 No milestone ^ SyntaxError: invalid syntax Linked pull requests File "", line 1 Linked pull requests ^ SyntaxError: invalid syntax Successfully merging a pull request may close this issue. File "", line 1 Successfully merging a pull request may close this issue. ^ SyntaxError: invalid syntax

None yet File "", line 1 None yet ^ SyntaxError: invalid syntax Notifications Traceback (most recent call last): File "", line 1, in NameError: name 'Notifications' is not defined Customize Traceback (most recent call last): File "", line 1, in NameError: name 'Customize' is not defined You’re receiving notifications because you were mentioned. File "", line 1 You’re receiving notifications because you were mentioned. ^ SyntaxError: invalid character in identifier 2 participants File "", line 1 2 participants ^ SyntaxError: invalid syntax @cytham ... @gchevignon

cytham commented 3 years ago

I don't understand your reply

gchevignon commented 3 years ago

sorry my bad ... I did something wrong when I have pasted the command in python ... the new HTML report looks similar than the previous one

cytham commented 3 years ago

Ok thanks for trying.

I am not sure why you get the seg fault then. Perhaps you can try to rerun NanoVar again and see if you still get seg fault. If you do run it again, please do check if the new HTML report is produced.

Moving forward, the NanoVar pipeline is considered complete without the report, and if the report is not important in your analysis, you may just ignore the seg fault. Thanks

gchevignon commented 3 years ago

OK that's great ! Thanks a lot for your time ! Cheers