MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000090MEGA[All Projects] Feedbackpublic2016-03-08 20:012016-03-08 20:01
Reporterguest 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
PlatformOS 
Product VersionMEGA 11 (Graphical Interface version) 
Target VersionFixed in Version 
Summary0000090: MEGA7
DescriptionMege7 for widows64bit have problems in showing the trees. Trees can't show full with the right part missing.
TagsNo tags attached.
Attach Tags (Separate by ",")
First NameWei
Last NameTong
Emailtw7649116@gmail.com
Confirm Emailtw7649116@gmail.com
Attached Files

- Relationships

- Upload Files
Select Files
(Maximum size: 5,000k)





-  Notes
(0000028)
gstecher (administrator)
1969-12-31 17:33

Has this bug been fixed? I can\'t seem to reproduce the problem.
(0000030)
Nikita Vikhrev (reporter)
1969-12-31 17:33

This happens only when reading a long sequence. The problem is in TFormatConvertToMega.convert_from_fasta because of a memory allocation deficiency of Delphi. Here is my version of the fix.

//==================================================================
procedure TFormatConvertToMega.convert_from_fasta;
//==================================================================
Var
  NextPos : integer;
  NewStr, AStr, CurKey : String;
  i,CurSize, SeqStart : integer;

  procedure SetSeqDataHash;
  var
    CurSeq: string;
    CurPos,j,k: integer;
  begin
    if (CurKey = \'\') or (CurSize = 0) then
      exit;
    SetLength(CurSeq, CurSize);
    CurPos := 0;
    for j := SeqStart to BStrList.Count-1 do
    begin
      for k := 1 to Length(BStrList[j]) do
        CurSeq[k+CurPos] := BStrList[j][k];
      inc(CurPos, Length(BStrList[j]));
    end;
    SeqDataHash.Values[CurKey] := CurSeq;
  end;

begin
  CurKey := \'\';
  CurSize := 0;
  for i := 0 to AStrList.Count-1 do
  begin
    AStr := Trim(AStrList[i]);
    if Astr <> \'\' then
    begin
      if AStr[1] = \'>\' then // Retrieves Name of Sequence
      begin
        SetSeqDataHash;

        // Check for >P1; type formatting and delete to ;
        if Pos(\';\', AStr) > 0 then
        begin
          // We have a semicolon but is it
        end;
        NextPos := Pos(\' \', AStr);
        Delete (AStr, NextPos, (Length(AStr) - NextPos + 1));
        Delete (Astr, 1, 1);
        CurKey := AStr;
        NewStr := \'#\';
        BStrList.Add( NewStr+Astr );

        CurSize := 0;
        SeqStart := BStrList.Count;
      end
      else
      begin // Retrieves Sequence Data
        BStrList.Add( Astr );
        CurSize := CurSize +Length(Astr);
{
        if (SeqDataHash.IndexOfName(CurKey) = -1) then
          SeqDataHash.Values[CurKey] := Astr
        else
          SeqDataHash.Values[CurKey] := SeqDataHash.Values[CurKey] + Astr;
}
      end;
    end;
  end;
  SetSeqDataHash;
end;


edited on: 10-14 20:00
(0000034)
gstecher (administrator)
1969-12-31 17:33

I fixed this bug already and noticed the same memory problem. Thanks for the suggestion.

- Issue History
Date Modified Username Field Change
2016-03-08 20:01 guest New Issue


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker