What is MIME type "chemical/seq-na-fasta"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

The MIME type chemical/seq-na-fasta represents nucleotide sequences in a FASTA text format.
It uses a plain text structure with a header line starting with a ">" symbol, followed by lines of sequence data.
This format is key in storing DNA or RNA sequence information.
Common file extensions include FASTA and FA.
For further details on the format, see the FASTA format article.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: chemical/seq-na-fasta    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="chemical/seq-na-fasta">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'chemical/seq-na-fasta');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the purpose of the chemical/seq-na-fasta MIME type?

This MIME type specifically identifies nucleic acid sequences (DNA or RNA) stored in the FASTA format. It informs the client software or browser that the plain text content represents biological sequence data, distinguishing it from generic text or amino acid sequences.

Which file extensions are associated with chemical/seq-na-fasta?

The most common file extensions are .fasta and .fa. However, you may also encounter variations like .fna (specifically for nucleic acids) or .seq depending on the bioinformatics software generating the file.

How do I open a FASTA file on my computer?

Since FASTA files use a simple text-based structure, you can open them with any standard text editor like Notepad (Windows), TextEdit (macOS), or code editors like VS Code. For specialized analysis, you should use bioinformatics tools like BLAST or alignment software.

How do I configure Apache to serve FASTA files correctly?

To ensure your Apache server sends the correct headers for FASTA files, add the following line to your .htaccess file or main configuration: AddType chemical/seq-na-fasta .fasta .fa.

How do I add support for chemical/seq-na-fasta in Nginx?

In Nginx, you can add the type to your mime.types file or include it directly in your server block inside the types directive: types { chemical/seq-na-fasta fasta fa; }.

Why does my browser download the FASTA file instead of displaying it?

Most web browsers do not natively render the chemical/ MIME category. Unless you have a specific bioinformatics plugin installed, the browser defaults to downloading the file. To force display in the browser, developers often serve these files as text/plain or use JavaScript libraries to parse and render the data.

Is chemical/seq-na-fasta the same as chemical/seq-aa-fasta?

No, they represent different biological data. chemical/seq-na-fasta is for nucleic acids (DNA/RNA), while chemical/seq-aa-fasta is used for amino acid (protein) sequences. Although the file structure (FASTA) is identical, the MIME type helps distinct processing pipelines identify the biological content.

Can I just use text/plain instead of chemical/seq-na-fasta?

Yes, using text/plain is a common alternative because it ensures the file is readable in a web browser without downloading. However, using the specific chemical/seq-na-fasta type is semantically more accurate for APIs and specialized bioinformatics applications that need to automate data processing.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.