linzhi2013 / MitoZ

MitoZ: A toolkit for assembly, annotation, and visualization of animal mitochondrial genomes
https://doi.org/10.1093/nar/gkz173
GNU General Public License v3.0
115 stars 39 forks source link

mitoz3.4 annotations draw circle diagrams all have a gap, but in other annotation platforms are circular #172

Open sanjin725 opened 1 year ago

sanjin725 commented 1 year ago

mitoz3.4 annotations draw circle diagrams all have a gap, but in other annotation platforms are circular

Problem description

Log messages from MitoZ (stdout and stderr)

linzhi2013 commented 1 year ago

Hi sanjin,

thanks for reporting the issue, I will check it later.

All the best

gdcfy commented 1 year ago

Hi sanjin,

thanks for reporting the issue, I will check it later.

All the best

Hi I get the circular mitoz diagram with a gap, is this OK or anyother errors taken place?

circos

linzhi2013 commented 1 year ago

Hi gdcfy,

Even when the mitogenome is complete, the current visualization seems to keep a gap between the starting point and ending point. I forgot to fix it in MitoZ 3.6 too...

gdcfy commented 1 year ago

Thanks for your sincerely reply!

---- Replied Message ---- | From | Guanliang @.> | | Date | 06/21/2023 23:17 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [linzhi2013/MitoZ] mitoz3.4 annotations draw circle diagrams all have a gap, but in other annotation platforms are circular (Issue #172) |

Hi gdcfy,

Even when the mitogenome is complete, the current visualization seems to keep a gap between the starting point and ending point. I forgot to fix it in MitoZ 3.6 too...

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

linzhi2013 commented 1 year ago

Hi @gdcfy ,

I just check MitoZ 3.6. This bug has been fixed in MitoZ 3.6. See below:

circos

Therefore, you may need to upgrade to MitoZ 3.6.

Best

linzhi2013 commented 1 year ago

Please beware that, MitoZ looks for the "circular" character in your input GenBank file.

LOCUS       k99_0                  16453 bp    DNA     circular PRI 21-JUN-2023

So, even if your mitogenome is complete, but if you don't have the "circular" on the first line of your GenBank file, MitoZ still considers it incomplete.

my $break;
foreach my $l(@lines) {
    my $a = (split/\s+/,$l)[1];
    my $topo = (split/\s+/,$l)[5];
    $topology{$a} = $topo;
    if ($topo eq 'circular') {
        $break = 0;
    }else {
        $break = "0.5r";
    }
}
linzhi2013 commented 1 year ago

If you use MitoZ for the assembly, you can go to check the content of the tmp/mt_assembly/megahit/DM01.megahit.overlap_information file:

>k99_0 overlap between 5' and 3' are 100bp
AACAATATTCTTGGCGGCCGATTTCTAAATGTTCAACCTTGTTAGTTTTTTCTGTATGCACTGTGAAATGCAAAGTGAAAGGAAATAGAGAAAAAAAAC

If it is long enough and not a simple repeat, then your mitogenome is probably complete (i.e. circular). This information is also available in the summary.txt file:

#Seq_id        Length(bp)     Circularity    Closely_related_species
k99_0          16453          yes            Oryzias sinensis

Please refer to the wiki for more details.

gdcfy commented 1 year ago

Hi, According to this problem,I will take your advice step by step later

---- Replied Message ---- | From | Guanliang @.> | | Date | 06/21/2023 23:51 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [linzhi2013/MitoZ] mitoz3.4 annotations draw circle diagrams all have a gap, but in other annotation platforms are circular (Issue #172) |

If you use MitoZ for the assembly, you can go to check the content of the tmp/mt_assembly/megahit/DM01.megahit.overlap_information file:

k99_0 overlap between 5' and 3' are 100bp AACAATATTCTTGGCGGCCGATTTCTAAATGTTCAACCTTGTTAGTTTTTTCTGTATGCACTGTGAAATGCAAAGTGAAAGGAAATAGAGAAAAAAAAC

If it is long enough and not a simple repeat, then your mitogenome is probably complete (i.e. circular). This information is also available in the summary.txt file:

Seq_id Length(bp) Circularity Closely_related_species

k99_0 16453 yes Oryzias sinensis

Please refer to the wiki for more details.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

gdcfy commented 1 year ago

Hi, @linzhi2013 I get a problem. There is no any content in the file "tmp/mt_assembly/megahit/DM01.megahit.overlap_information", which may lead to gap of the circular diagram. But I don't know what does it caused from and how to figure it out.

<img width="318" alt="image" src="https://github.com/linzhi2013/MitoZ/assets/115930352/98c333a6-b167-4abc-8fe3-a1ade74b4f4b">
gdcfy commented 1 year ago

Hi, @linzhi2013 I get a problem. There is no any content in the file "tmp/mt_assembly/megahit/DM01.megahit.overlap_information", which may lead to gap of the circular diagram. But I don't know what does it caused from and how to figure it out.

image

and I use the mitoz with version 3.6

image
linzhi2013 commented 1 year ago

Hi, @linzhi2013 I get a problem. There is no any content in the file "tmp/mt_assembly/megahit/DM01.megahit.overlap_information", which may lead to gap of the circular diagram. But I don't know what does it caused from and how to figure it out.

image

and I use the mitoz with version 3.6

image

I just noticed that, according to your circos plot, the coverage along your mitogenome is quite low, except in the region around 18Kbp. PLease go to check the filemt_annotation/tmp_DM01_DM01.megahit.mitogenome.fa_mitoscaf.fa/mt_visualization/circos.depth.txt and check the exact depth of your mitogenome. If many sites have very low or even 0X, it indicates your mitogenome is not reliable.

You should check if the recovered mitogenome belongs to your target species. Please refer to https://github.com/linzhi2013/MitoZ/wiki/Tutorial#7-what-now

BTW, what kind of data did you use? and what was the MitoZ command? You might also try to use larger kmers if the mitogenome is partially wrong (especially for the region after 16Kbp), or use the mitoAssemble assembler in MitoZ.

gdcfy commented 1 year ago

Hi, @linzhi2013 I get a problem. There is no any content in the file "tmp/mt_assembly/megahit/DM01.megahit.overlap_information", which may lead to gap of the circular diagram. But I don't know what does it caused from and how to figure it out.

<img width="318" alt="image" src="https://github.com/linzhi2013/MitoZ/assets/115930352/98c333a6-b167-4abc-8fe3-a1ade74b4f4b">

Hi, According to your suggests. I figured out the problem with changing paramater. original paramater:

mitoz all --fq1 HK170851_1.fq.gz  --fq2 HK170851_2.fq.gz  --outprefix HK  --clade Chordata  --requiring_taxa Chordata   --data_size_for_mt_assembly 5,0    --assembler megahit  --memory 50

altered paramater:

mitoz all --fq1 HK1708115_1.fq.gz  --fq2 HK1708115_2.fq.gz  --outprefix HK  --clade Chordata  --genetic_code 2   --requiring_taxa Chordata   --data_size_for_mt_assembly 5,0    --assembler megahit  --kmers_megahit 59 79 99 119 141    --memory 50 

the gap may caused by setting kmer size which problem refered as "https://github.com/linzhi2013/MitoZ/wiki/Known-issues#8-megahit-gets-very-long-sequences"

after revising the gap with the "altered paramater", there is another problem that between the starting and ending site of mitogenome. at the contig between the starting and ending site, there is low abundance, and for this problem I changed the paramater from --data_size_for_mt_assembly 5,0
to --data_size_for_mt_assembly 25,0 . finally the problems have been solved but with much running time

linzhi2013 commented 1 year ago

Sometimes it happens. Different samples have different ratios of mitogenome-derived reads. And different regions of the mitogenome usually have coverage variations, the AT-rich region (e.g. control region) usually gets lower coverage, probably due to some experimental and sequencing bias in NGS sequencing.

If we use more input fastq data, we get more MT-reads, so the overall coverage of the mitogenome will rise up.