cytham / nanovar

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

sv_cluster() Error #22

Closed kztyes closed 3 years ago

kztyes commented 3 years ago

TypeError: sv_cluster() missing 1 required positional argument: 'seed' The following picture is my detailed output:

微信图片_20210428102638

cytham commented 3 years ago

Hi @kztyes, may I know what version of NanoVar you are using? Can you please try out the newest version 1.3.9?

kztyes commented 3 years ago

Hello, @cytham, after the version 1.3.9 has been replaced, new problem arises: 微信图片_20210428170255

cytham commented 3 years ago

Hi @kztyes the error means that the contig "1" found in your BAM file is not found in the reference genome. Please ensure that the reference genome you provide is the same one you used for read mapping.

kztyes commented 3 years ago

Hi @cytham , I think I probably know why this problem occurs. My BAM file is divided into chromosomes , I used the BAM file of chromosome 2 to detect structural variation through nanovar, so there is no contig "1". What should I do in this situation?

cytham commented 3 years ago

Can I check if the chromosome header in the BAM file matches the chromosome of the alignments? For example, does the chromosome 2 BAM file only state chromosome 2 in its header, etc.

And do you also split the reference to individual chromosomes?

kztyes commented 3 years ago

I didn't split the reference to individual chromosomes , and this is my header file: hg002_allreads_ngmlr.2.txt

cytham commented 3 years ago

can you index the reference genome FASTA file using samtools faidx and send me the .fai file? Thanks

kztyes commented 3 years ago

发自我的华为手机

cytham commented 3 years ago

Hi @kztyes, I am having a problem understanding the message.

kztyes commented 3 years ago

After commenting out the following code, Nanovar works well. Then it outputs two VCF files, which one should I use, Pass or Total ?

` # Check BAM contigs in reference genome

if input_type == 'bam':

#     for c in contig_list:
#         if c not in contig_len_dict:
#             logging.critical("Error: Contig %s in BAM is absent in reference genome" % c)
#             raise Exception("Error: Contig %s in BAM is absent in reference genome" % c)`
cytham commented 3 years ago

@kztyes Yea it worked because you just removed the function to ensure that there are same contig labels in both the reference genome and BAM file. The reason you got that error in the first place is because you had mismatching contig names between your reference genome and BAM file. Please proceed at your own risk to comment this section out. I recommend to check the contig labeling of your reference file (e.g. whether chromosome 1 is labeled "1" or "chr1" or something else)

You should use the Pass VCF as it has been enriched for more true variants.

cytham commented 3 years ago

@kztyes any updates on this issue? if not I will close it for now.