seqdisp
Format long sequence output for easy viewing
Description
seqdisp(
displays a sequence in rows, with
a default row length of Seq
)60
and a default column width of
10
.
seqdisp(
adjusts aspects of the displayed sequence, such as the row length and column width, using
name-value arguments.Seq
,Name=Value
)
Examples
Display Sequence
Read sequence information from the GenBank® database.
mouseHEXA = getgenbank("AK080777");
Display the sequence in rows with 50 letters, and within a row, separate every 10 letters with a space.
seqdisp(mouseHEXA,Row=50,Column=10)
ans = 38x60 char array
'>gb|AK080777.1| Mus musculus 9.5 days embryo parthenogeno...'
' 1 GCTGCTGGAA GGGGAGCTGG CCGGTGGGCC ATGGCCGGCT GCAGGCTCTG'
' 51 GGTTTCGCTG CTGCTGGCGG CGGCGTTGGC TTGCTTGGCC ACGGCACTGT'
' 101 GGCCGTGGCC CCAGTACATC CAAACCTACC ACCGGCGCTA CACCCTGTAC'
' 151 CCCAACAACT TCCAGTTCCG GTACCATGTC AGTTCGGCCG CGCAGGCGGG'
' 201 CTGCGTCGTC CTCGACGAGG CCTTTCGACG CTACCGTAAC CTGCTCTTCG'
' 251 GTTCCGGCTC TTGGCCCCGA CCCAGCTTCT CAAATAAACA GCAAACGTTG'
' 301 GGGAAGAACA TTCTGGTGGT CTCCGTCGTC ACAGCTGAAT GTAATGAATT'
' 351 TCCTAATTTG GAGTCGGTAG AAAATTACAC CCTAACCATT AATGATGACC'
' 401 AGTGTTTACT CGCCTCTGAG ACTGTCTGGG GCGCTCTCCG AGGTCTGGAG'
' 451 ACTTTCAGTC AGCTTGTTTG GAAATCAGCT GAGGGCACGT TCTTTATCAA'
' 501 CAAGACAAAG ATTAAAGACT TTCCTCGATT CCCTCACCGG GGCGTACTGC'
' 551 TGGATACATC TCGCCATTAC CTGCCATTGT CTAGCATCCT GGATACACTG'
' 601 GATGTCATGG CATACAATAA ATTCAACGTG TTCCACTGGC ACTTGGTGGA'
' 651 CGACTCTTCC TTCCCATATG AGAGCTTCAC TTTCCCAGAG CTCACCAGAA'
' 701 AGGGGTCCTT CAACCCTGTC ACTCACATCT ACACAGCACA GGATGTGAAG'
' 751 GAGGTCATTG AATACGCAAG GCTTCGGGGT ATCCGTGTGC TGGCAGAATT'
' 801 TGACACTCCT GGCCACACTT TGTCCTGGGG GCCAGGTGCC CCTGGGTTAT'
' 851 TAACACCTTG CTACTCTGGG TCTCATCTCT CTGGCACATT TGGACCGGTG'
' 901 AACCCCAGTC TCAACAGCAC CTATGACTTC ATGAGCACAC TCTTCCTGGA'
' 951 GATCAGCTCA GTCTTCCCGG ACTTTTATCT CCACCTGGGA GGGGATGAAG'
'1001 TCGACTTCAC CTGCTGGAAG TCCAACCCCA ACATCCAGGC CTTCATGAAG'
'1051 AAAAAGGGCT TTACTGACTT CAAGCAGCTG GAGTCCTTCT ACATCCAGAC'
'1101 GCTGCTGGAC ATCGTCTCTG ATTATGACAA GGGCTATGTG GTGTGGCAGG'
'1151 AGGTATTTGA TAATAAAGTG AAGGTTCGGC CAGATACAAT CATACAGGTG'
'1201 TGGCGGGAAG AAATGCCAGT AGAGTACATG TTGGAGATGC AAGATATCAC'
'1251 CAGGGCTGGC TTCCGGGCCC TGCTGTCTGC TCCCTGGTAC CTGAACCGTG'
'1301 TAAAGTATGG CCCTGACTGG AAGGACATGT ACAAAGTGGA GCCCCTGGCG'
'1351 TTTCATGGTA CGCCTGAACA GAAGGCTCTG GTCATTGGAG GGGAGGCCTG'
'1401 TATGTGGGGA GAGTATGTGG ACAGCACCAA CCTGGTCCCC AGACTCTGGC'
'1451 CCAGAGCGGG TGCCGTCGCT GAGAGACTGT GGAGCAGTAA CCTGACAACT'
'1501 AATATAGACT TTGCCTTTAA ACGTTTGTCG CATTTCCGTT GTGAGCTGGT'
'1551 GAGGAGAGGA ATCCAGGCCC AGCCCATCAG TGTAGGCTGC TGTGAGCAGG'
'1601 AGTTTGAGCA GACTTGAGCC ACCAGTGCTG AACACCCAGG AGGTTGCTGT'
'1651 CCTTTGAGTC AGCTGCGCTG AGCACCCAGG AGGGTGCTGG CCTTAAGAGA'
'1701 GCAGGTCCCG GGGCAGGGCT AATCTTTCAC TGCCTCCCGG CCAGGGGAGA'
'1751 GCACCCCTTG CCCGTGTGCC CCTGTGACTA CAGAGAAGGA GGCTGGTGCT'
'1801 GGCACTGGTG TTCAATAAAG ATCTATGTGG CATTTTCTC '
Display FASTA File
Create and save a FASTA file with two sequences, and then display it.
hdr = ['Sequence A'; 'Sequence B']; seq = ['TAGCTGRCCAAGGCCAAGCGAGCTTN';'ATCGACYGGTTCCGGTTCGCTCGAAN']
seq = 2x26 char array
'TAGCTGRCCAAGGCCAAGCGAGCTTN'
'ATCGACYGGTTCCGGTTCGCTCGAAN'
fastawrite("local.fa",hdr,seq); seqdisp("local.fa",ShowNumbers=false)
ans = 5x65 char array
'>Sequence A '
'TAGCTGRCCA AGGCCAAGCG AGCTTN '
' '
'>Sequence B '
'ATCGACYGGT TCCGGTTCGC TCGAAN '
Input Arguments
Seq
— Nucleotide or amino acid sequence
character array | string vector | character vector | string scalar | structure
Nucleotide or amino acid sequence, specified as one of the following:
Character array or string vector containing a sequence
Character vector or string scalar containing the FASTA file name
Structure with the field
Sequence
The seqdisp
function supports multiply aligned
sequences.
FASTA files can have the file extension fa
,
fasta
, fas
, fsa
, or
fst
.
Data Types: char
| string
| struct
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: seqdisp(mouseHEXA,Row=50)
displays a sequence with rows of
length 50
.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: seqdisp(mouseHEXA,"Row",50)
Row
— Length of each row
60
(default) | positive integer
Length of each row, specified as a positive integer. The value of
Row
must be larger than and evenly divisible by the value of
Column
.
Column
— Column width
10
(default) | positive integer
Column width or number of symbols before displaying a space, specified as a positive integer.
ShowNumbers
— Display numbers at start of each row
true
or 1
(default) | false
or 0
Display numbers at the start of each row, specified as a numeric or logical
true
(1
) or false
(0
). Specify true
to show numbers, or
false
to hide numbers.
Version History
Introduced before R2006a
See Also
multialignread
| multialignwrite
| seqconsensus
| seqlogo
| seqprofile
| seqshoworfs
| seqviewer
| getgenbank
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)