One or more sequences can be obtained from a filename or variable or provided as a literal sequence. Sequence variables always start with a dollar sign ($).
Objective | Expression | Examples | Comments |
---|---|---|---|
Write any sequence expression to a sequence file | filename=sequence_expression |
myfile.fasta=$b |
Causes output to be written to the specified file, in a format determined by the specified file’s extension. If you use the = expression and the filename already exists, you will be asked whether you wish to overwrite it. Appending is supported via the += expression (see next row). |
Append data to an existing sequence file | filename+=sequence_expression |
myfile.fasta+=$b |
This adds data to an existing file rather than overwriting the existing data. |
Convert to another format | sequence_setA=sequence_setB |
alpha.fasta=alpha.gb |
|
Convert a set into a data file | sequence_setA=sequence_setB.star |
my.fasta=my.star |
|
Assign a sequence expression to a variable | Simple filenames | $a=myfile.fasta |
Double quotes are necessary for filenames that include characters other than A-Z, a-z, 0-9, the underscore, or ‘.’ after the first character. |
Filename with spaces | $b="my filename.fasta" |
||
Filename with slashes | $c="C:\data\MG1655-e-coli-k-12substrands.fasta" |
||
Unicode filename | $d="Мое имя файла.fasta" |
||
Filename with diacritic mark | $e="ma séquence.fasta" |
||
Assign a variable or filename to a literal sequence | "sequence" |
$f="ACGT" |
Where a sequence expression might occur, double quoted string literals are interpreted as either sequence literals or sequence filenames, depending on whether they contain characters outside A-Z and a-z. |
sequence_set="sequence" |
alpha.fasta="ACGT" |
Need more help with this?
Contact DNASTAR