FASTA¶
Description¶
Lipman, DJ; Pearson, WR (1985). “Rapid and sensitive protein similarity searches”. Science 227 (4693): 1435–41. doi:10.1126/science.2983426.
Reading¶
Schema-Specific Keyword Arguments¶
Supported Methods¶
DnaCharacterMatrix.get
¶
d = dendropy.DnaCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
)
RnaCharacterMatrix.get
¶
d = dendropy.RnaCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
)
ProteinCharacterMatrix.get
¶
d = dendropy.ProteinCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
)
RestrictionSitesCharacterMatrix.get
¶
d = dendropy.RestrictionSitesCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
)
InfiniteSitesCharacterMatrix.get
¶
d = dendropy.InfiniteSitesCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
)
StandardCharacterMatrix.get
¶
d = dendropy.StandardCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
default_state_alphabet=None,
)
d = dendropy.StandardCharacterMatrix.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
matrix_offset=None,
ignore_unrecognized_keyword_arguments=False,
default_state_alphabet=dendropy.new_standard_state_alphabet("0123456789"),
)
DataSet.get
¶
Note that the type of data needs to be specified using the data_type
keyword argument.
d = dendropy.DataSet.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="dna",
)
d = dendropy.DataSet.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="dna",
)
d = dendropy.DataSet.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="standard",
)
d = dendropy.DataSet.get(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="standard",
default_state_alphabet=dendropy.new_standard_state_alphabet("01")
)
DataSet.read
¶
Note that the type of data needs to be specified using the data_type
keyword argument.
d = dendropy.DataSet()
d.read(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="dna",
)
d = dendropy.DataSet()
d.read(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="protein",
)
d = dendropy.DataSet()
d.read(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="standard",
)
d = dendropy.DataSet()
d.read(
path="data.fas",
schema="fasta",
label=None,
taxon_namespace=None,
ignore_unrecognized_keyword_arguments=False,
data_type="standard",
default_state_alphabet=dendropy.new_standard_state_alphabet("abc"),
)
Writing¶
Schema-Specific Keyword Arguments¶
Supported Methods¶
DnaCharacterMatrix.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
DnaCharacterMatrix.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
RnaCharacterMatrix.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
RnaCharacterMatrix.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
ProteinCharacterMatrix.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
ProteinCharacterMatrix.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
RestrictionSitesCharacterMatrix.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
RestrictionSitesCharacterMatrix.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
InfiniteSitesCharacterMatrix.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
InfiniteSitesCharacterMatrix.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
StandardCharacterMatrix.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
StandardCharacterMatrix.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
DataSet.write
¶
d.write(
path="data.fas",
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)
DataSet.as_string
¶
s = d.as_string(
schema="fasta",
wrap=True,
ignore_unrecognized_keyword_arguments=False,
)