> For the complete documentation index, see [llms.txt](https://manual.microbial-genomes.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.microbial-genomes.org/master/part4/deploy-refseq.md).

# RefSeq in MiGA

In this tutorial, we will create a genomes project including all the representative genomes available in RefSeq using MiGA alone. If you want to explore a more manual approach using `bash`, see the [RefSeq in MiGA using BASH example](https://github.com/bio-miga/miga/tree/46281f59136d6237b8629ae9f5017a63d9bfbe72/manual/part4/deploy-refseq-bash.md).

## 0. Initialize the project

```bash
miga new -P RefSeq -t genomes
cd RefSeq
```

## 1. Download publicly available genomes

**Re-running and updating**: If the following code fails at any point, for example due to a network interruption, you can simply re-run it, and it will take it from where it failed.

```bash
miga ncbi_get -P . --reference -v
```

It is strongly recommended to use an [NCBI API Key](https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/) to increase the number of allowed requests. Once you obtain one, you can pass it as an argument:

```bash
miga ncbi_get -P . --reference --api-key ABCD123 -v
```

Or you can set it globally as an environmental variable before running `miga`:

```bash
export NCBI_API_KEY=ABCD123
```

## 2. Launch the daemon

Now that your data is ready, you can fire up the daemon to start processing the data. For additional details, see [launching daemons](/master/part4/daemons.md):

```bash
miga daemon start -P .
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://manual.microbial-genomes.org/master/part4/deploy-refseq.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
