shendurelab / LACHESIS

The LACHESIS software, as described in Nature Biotechnology (http://dx.doi.org/10.1038/nbt.2727)
Other
75 stars 33 forks source link

error: Assertion `c1.pos == c2.mpos' failed #51

Open hzaumsq opened 5 years ago

hzaumsq commented 5 years ago

Filling 21 clusters with Hi-C data from SAM file /public/msq/WHF4-1/script//Mi.REduced.paired_only.bam (dot = 1M alignments) Lachesis: ChromLinkMatrix.cc:2186: void LoadDeNovoCLMsFromSAM(const string&, const string&, const ClusterVec&, std::vector<ChromLinkMatrix*>): Assertion `c1.pos == c2.mpos' failed.

orange-phoebe commented 5 years ago

Hello, Have you solved this problem? I met the same issue with running LACHESIS. I haven't find out what's wrong with it. How to deal with the error? Could you please provide me any clue about it? A thousand thanks !

Lordhooze commented 5 years ago

i meet the same problem? any solutions? thank you

orange-phoebe commented 5 years ago

I figured it out with the help of an expert. To solve this problem, you should filter the alignment result with flag >1024 in .SAM file. This Perl script will help:

my ($in, $out) = @ARGV; open IN, "$in"; open OUT, ">$out"; while (my $line = ){ if ($line =~ /^@/){ print OUT "$line"; next; } my @flag = split(/\s+/,$line); next if $flag[1] >= 1024; print OUT "$line"; } close IN;

GitHub-Lujianjun commented 5 years ago

Hi,orange-phoebe Thank you for your suggestions.I don't understand why it could figure out the error after filter flag >1024 in .SAM file.Ok, After filtered, I doubt that the filtered Sam file will affect results?

Looking forward to your kind reply

Lu