зеркало из https://github.com/dotnetbio/bio.git
Merge branch 'master' of https://github.com/dotnetbio/bio
This commit is contained in:
Коммит
b4159816cd
|
@ -1042,7 +1042,11 @@ namespace Bio.IO.GenBank
|
|||
{
|
||||
// Using a regex is too slow.
|
||||
int len = line.Length;
|
||||
int k = line.Length > 8 && line[8] == ' ' ? 9 : 10;
|
||||
|
||||
int k = 0;
|
||||
while (k < len && (line[k] == ' ' || Char.IsNumber(line[k])))
|
||||
k++;
|
||||
|
||||
while (k < len)
|
||||
{
|
||||
string seqData = line.Substring(k, Math.Min(10, len - k));
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace Bio.Tests.IO.GenBank
|
|||
#region Fields
|
||||
private const string _genBankFile_LocusTokenParserTest = @"TestUtils\GenBank\LocusTokenParserTest.gb";
|
||||
private const string _genBankFile_ParseOriginShifted = @"TestUtils\GenBank\ParseOriginShifted.gb";
|
||||
private const string _genBankFile_ParseOriginShifted2 = @"TestUtils\GenBank\ParseOriginShifted2.gb";
|
||||
private const string _genBankFile_ParseVersionEmpty = @"TestUtils\GenBank\ParseVersionEmptyTest.gb";
|
||||
private const string _genBankFile_EmptyOrganismClassificationTest = @"TestUtils\GenBank\EmptyOrganismClassificationTest.gb";
|
||||
private const string _genBankFile_WithTPAPrimaryData = @"TestUtils\GenBank\BK000016-tpa.gbk";
|
||||
|
@ -313,6 +314,20 @@ ORIGIN
|
|||
Assert.IsNotNull(seq);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This test used to fail. The sequence is in a GenBank format and would fail if the
|
||||
/// ORIGIN contents started at any other index than 10.
|
||||
/// </summary>
|
||||
[Test]
|
||||
[Category("Priority0")]
|
||||
public void TestGenBankParseOriginShifted2()
|
||||
{
|
||||
// parse
|
||||
GenBankParser parser = new GenBankParser();
|
||||
ISequence seq = parser.Parse(_genBankFile_ParseOriginShifted2).FirstOrDefault();
|
||||
Assert.IsNotNull(seq);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that the parser throws an exception when calling ParseOne on a file containing
|
||||
/// more than one sequence.
|
||||
|
|
|
@ -1091,6 +1091,9 @@
|
|||
<None Include="$(MSBuildThisFileDirectory)TestUtils\GenBank\NM_001747.gb">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)TestUtils\GenBank\ParseOriginShifted2.gb">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)TestUtils\GenBank\ParseOriginShifted.gb">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
@ -2184,7 +2187,7 @@
|
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)TestUtils\PacBio\ccs.bam">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
LOCUS AAB24880 74 aa linear DNA 08-MAY-1993
|
||||
DEFINITION zinc finger [Homo sapiens].
|
||||
ACCESSION AAB24880
|
||||
VERSION .
|
||||
DBSOURCE accession S52506.1
|
||||
KEYWORDS .
|
||||
SOURCE Homo sapiens (human)
|
||||
ORGANISM Homo sapiens
|
||||
.
|
||||
REFERENCE 1 (residues 1 to 74)
|
||||
AUTHORS Saleh,M., Selleri,L., Little,P.F. and Evans,G.A.
|
||||
TITLE Isolation and expression of linked zinc finger gene clusters on
|
||||
human chromosome 11q
|
||||
JOURNAL Genomics 14 (4), 970-978 (1992)
|
||||
PUBMED 1339395
|
||||
REMARK GenBank staff at the National Library of Medicine created this
|
||||
entry [NCBI gibbsq 122386] from the original journal article.
|
||||
COMMENT Method: conceptual translation supplied by author.
|
||||
FEATURES Location/Qualifiers
|
||||
source 1..74
|
||||
/organism="Homo sapiens"
|
||||
/db_xref="taxon:9606"
|
||||
Protein 1..74
|
||||
/name="zinc finger"
|
||||
CDS 1..74
|
||||
/gene="ZNF123"
|
||||
/coded_by="S52506.1:1..222"
|
||||
ORIGIN
|
||||
1 CCTTCCATCG ATCGGAAAGA CTAGCTAGGG GCTGCAGGAA TTCGGGACAA AAGTCGCTTC
|
||||
61 GAAGCGGCGC GCCCCCGGAC CGGCTGTACA GGATTTAAAT GCGCTAGCGA ATTCTCATCA
|
||||
|
||||
//
|
Загрузка…
Ссылка в новой задаче