alignment e_value bug #77
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Report a MCScanX bug(alignment e_value)
Introduction
The following is
main.ccfile'smainfunction.Pay attention to the
read_gff(prefix_fn);function called by themainfunction. (Below is theread_gfffunction code and part of thegff file)The
read_gfffunction stores thechromosome nameon which the gene is located, thegene nameand thestarting positionof the gene in the gff file in gene_map.Initial the
gene_idattribute ofGene_feat.Note that
Gene_featalso has an attributegene_id. In the subsequentfill_allg()function (called in themainfunction), thegene_idattribute will be initialized. The following is thefill_allg()code.gene_idrefers to theline number(0-based) of a gene in a gff file, or an element of a gene_map (by default, gene_map is sorted bykey, i.e.,gene name). But in theis_sigificantfunction,gene_idwas incorrectly compared with thestartandendpositions at thebase pairlevel.The following is
is_sigificiantfunction(main -> feed_dag -> dag_main -> print_chains -> is_significant)The following is bug code.
In the above code,
it->xisgene_id, andit->yis alsogene_id, buts1_a,s1_b,s2_a, ands2_bare the base pair positions of the four genes corresponding to the two gene pairs at the two ends of the alignment, which are obviously not in the same order of magnitude, so theNvalue is almost0. So I think it is correct to use the attributemid(the starting position at the base pair level) here.Reproduce this bug
Add
#include <iostream>at the top of thedagchainer.ccfile.Add
std::cout << "N: " << N << std::endl;inis_sigificantfunction.Running the following command.
A solution
Add
int x_mid, y_mid;instruct.hfileAdd
cur_score.x_mid = gene_map[it->gene1].mid; cur_score.y_mid = gene_map[it->gene2].mid;inread_data.ccfileModify the following code in
dagchainer.ccfile