# Matching and Analysis

## Starting the tool

There are 2 basic ways you can start the tool with.\
A simple one,  which means you will upload all the input files manually:&#x20;

```
$ docker run -p 5000:5000 solqc/tool
```

Or with an additional parameter (-v), which will allow you to access local files directly on the app by:

```
$ docker run -p 5000:5000 -v path/to/folder_with_data:/solqc/data solqc/tool
```

If you want to analyse large files (>500mb) it is highly recommended you use the 2nd approach.

## Inputting Files

### Design

<figure><img src="https://2747853774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeG1a5HYCKC6GFmlh1i%2Fuploads%2Fihv2CBSDujScbhB6OZjd%2Fimage-2.png?alt=media&#x26;token=661e215d-5933-4cbf-93e5-4dd1260b952e" alt=""><figcaption></figcaption></figure>

As you can see, you have 2 boxes from which you can choose to input a design (going from left to right) :&#x20;

1. Upload a local design.csv file yourself.
2. Inputing an IUPAC String.

### NGS Files (Currently supports Fastq)

<figure><img src="https://2747853774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeG1a5HYCKC6GFmlh1i%2Fuploads%2FC3cPp5sdwdBfL2yibAU2%2FImage%2007-07-2024%20at%2010.41.jpg?alt=media&#x26;token=086db892-b97e-4686-99f7-8825f69c42fa" alt=""><figcaption></figcaption></figure>

Here you have 3 options:

1. Uploading a zip containing all your fastq files (using **Upload File**).
2. Uploading a single fastq file (using **Upload File**).
3. Selecting your files from exisiting files if you mounted files using the -v option as described in **Starting the tool .**

### Library Configuration

<figure><img src="https://2747853774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeG1a5HYCKC6GFmlh1i%2Fuploads%2FpnYIcUkAT2kq8CbIZarr%2FScreenshot%202024-07-07%20at%2010.55.31.png?alt=media&#x26;token=decb1e4f-3b2b-4521-a49e-e27945d394f9" alt=""><figcaption></figcaption></figure>

Add library configurations as described in the preparation section.

## Choosing matching type

We currently supply 3 methods for matching between a **read** and a **variant:**

1. **BarcodeAligner :** Looks for a perfect match between the variant barcode and the location of the barcode in the read (as set in the **Library Configuration**).
2. **NEditBarcodeAligner :** Looks for the variant barcode with the smallest edit distance while allowing only variants with an edit distance smaller than n (a parameter you can set in the **Library Configuration** under *Barcode Tolerance*).
3. **EditDistanceAligner :** Compute the edit distance between a read and all the variants. Chooses the variant with the smallest edit distance from the read.

<figure><img src="https://2747853774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeG1a5HYCKC6GFmlh1i%2Fuploads%2Fg0iBRoBG1X1QeF4gRmgR%2FScreenshot%202024-07-07%20at%2010.52.31.png?alt=media&#x26;token=2f58c3f0-eb8b-40e7-a6cc-f371c5c3cf6e" alt=""><figcaption></figcaption></figure>

## Analysis options

You can choose between multiply analysis types which will be added to the report.\
To get a full depth understanding of our analysis list go to:

{% content-ref url="../analysis" %}
[analysis](https://yoav-orlev.gitbook.io/solqc/working-with-the-tool/analysis)
{% endcontent-ref %}
