<commit_before><div class="container">
  <app-header></app-header>
  <h2>FAANG files</h2>

  <h3 class="col-md-10 col-md-offset-1 text-primary" *ngIf="hasActiveFilters()">
    Active filters:
    <app-active-filter *ngIf="hasActiveFilters()"></app-active-filter>
    <button class="btn btn-default" type = "button" (click)="resetFilter()">Remove all filters</button>
  </h3>

  <div class="row">
    <div class="col-md-2">
      <div class="row">
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Standard" [filterSize]=5></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Study" [filterSize]=5></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Species" [filterSize]=6></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Assay type" [filterSize]=6></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Instrument" [filterSize]=6></app-filter>
        </div>
      </div>
    </div>

    <div class="fails-table col-md-10">
      <button class="btn btn-success" (click)="onDownloadData()">Dowload data</button>
        <app-export [data]="data" [filename]="'faang_data'" [options]="optionsCsv" *ngIf="downloadData">
          Export as CSV file
        </app-export>
        <app-export [data]="data" [filename]="'faang_data'" [options]="optionsTabular" *ngIf="downloadData">
          Export as Tabular file
        </app-export>
      <div *ngIf="(fileListLong | async) as files; else loading">
        <table class="table table-striped table-hover table-responsive">
          <thead>
          <tr>
            <th *ngFor="let column of columnNames" style="cursor: pointer" (click)="onTableClick($event)" [id]="column">
              {{ column }}
              <span [ngClass]="column === selectedColumn ? spanClass : defaultClass" *ngIf="column !== 'Standard'" [id]="column"></span>
            </th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let file of files | filter: filter_field: 'file' | sort: sort_field | paginate: { itemsPerPage: 25, currentPage: p }">
            <td><a style="cursor: pointer" [routerLink]="file['fileName']">{{file['fileName']}}</a></td>
            <td>{{file['study']}}</td>
            <td>{{file['experiment']}}</td>
            <td>{{file['species']}}</td>
            <td>{{file['assayType']}}</td>
            <td>{{file['specimen']}}</td>
            <td>{{file['instrument']}}</td>
            <td>{{file['standard']}}</td>
          </tr>
          </tbody>
        </table>
        <pagination-controls (pageChange)="p = $event"></pagination-controls>
      </div>
      <ng-template #loading>
        <table class="table table-striped table-hover table-responsive">
          <thead>
          <tr>
            <th *ngFor="let column of columnNames">
              {{ column }}
              <span [ngClass]="defaultClass" *ngIf="column !== 'Standard'"></span>
            </th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let file of fileListShort">
            <td><a style="cursor: pointer" [routerLink]="file['fileName']">{{file['fileName']}}</a></td>
            <td>{{file['study']}}</td>
            <td>{{file['experiment']}}</td>
            <td>{{file['species']}}</td>
            <td>{{file['assayType']}}</td>
            <td>{{file['specimen']}}</td>
            <td>{{file['instrument']}}</td>
            <td>{{file['standard']}}</td>
          </tr>
          </tbody>
        </table>
        <div>
          Loading...
        </div>
      </ng-template>
      <div class="alert alert-danger" *ngIf="error"><p>{{ error }}</p></div>
    </div>
  </div>
</div>
<commit_msg>Fixing download of sorted table<commit_after><div class="container">
  <app-header></app-header>
  <h2>FAANG files</h2>

  <h3 class="col-md-10 col-md-offset-1 text-primary" *ngIf="hasActiveFilters()">
    Active filters:
    <app-active-filter *ngIf="hasActiveFilters()"></app-active-filter>
    <button class="btn btn-default" type = "button" (click)="resetFilter()">Remove all filters</button>
  </h3>

  <div class="row">
    <div class="col-md-2">
      <div class="row">
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Standard" [filterSize]=5></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Study" [filterSize]=5></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Species" [filterSize]=6></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Assay type" [filterSize]=6></app-filter>
        </div>
        <div class="col-md-12 col-sm-6 faang-filter">
          <app-filter title="Instrument" [filterSize]=6></app-filter>
        </div>
      </div>
    </div>

    <div class="fails-table col-md-10">
      <button class="btn btn-success" (click)="onDownloadData()">Dowload data</button>
        <app-export [data]="data" [filename]="'faang_data'" [options]="optionsCsv" *ngIf="downloadData">
          Export as CSV file
        </app-export>
        <app-export [data]="data" [filename]="'faang_data'" [options]="optionsTabular" *ngIf="downloadData">
          Export as Tabular file
        </app-export>
      <div *ngIf="(fileListLong | async) as files; else loading">
        <table class="table table-striped table-hover table-responsive">
          <thead>
          <tr>
            <th *ngFor="let column of columnNames" style="cursor: pointer" (click)="onTableClick($event)" [id]="column">
              {{ column }}
              <span [ngClass]="column === selectedColumn ? spanClass : defaultClass" *ngIf="column !== 'Standard'" [id]="column"></span>
            </th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let file of files | sort: sort_field | filter: filter_field: 'file' | paginate: { itemsPerPage: 25, currentPage: p }">
            <td><a style="cursor: pointer" [routerLink]="file['fileName']">{{file['fileName']}}</a></td>
            <td>{{file['study']}}</td>
            <td>{{file['experiment']}}</td>
            <td>{{file['species']}}</td>
            <td>{{file['assayType']}}</td>
            <td>{{file['specimen']}}</td>
            <td>{{file['instrument']}}</td>
            <td>{{file['standard']}}</td>
          </tr>
          </tbody>
        </table>
        <pagination-controls (pageChange)="p = $event"></pagination-controls>
      </div>
      <ng-template #loading>
        <table class="table table-striped table-hover table-responsive">
          <thead>
          <tr>
            <th *ngFor="let column of columnNames">
              {{ column }}
              <span [ngClass]="defaultClass" *ngIf="column !== 'Standard'"></span>
            </th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let file of fileListShort">
            <td><a style="cursor: pointer" [routerLink]="file['fileName']">{{file['fileName']}}</a></td>
            <td>{{file['study']}}</td>
            <td>{{file['experiment']}}</td>
            <td>{{file['species']}}</td>
            <td>{{file['assayType']}}</td>
            <td>{{file['specimen']}}</td>
            <td>{{file['instrument']}}</td>
            <td>{{file['standard']}}</td>
          </tr>
          </tbody>
        </table>
        <div>
          Loading...
        </div>
      </ng-template>
      <div class="alert alert-danger" *ngIf="error"><p>{{ error }}</p></div>
    </div>
  </div>
</div>

{'fraction_non_alphanumeric': 0.2063369397217929, 'fraction_numerical': 0.00824317362184441, 'mean_word_length': 2.314127187366624, 'pattern_counts': {'":': 0, '<': 247, '<?xml version=': 0, '>': 247, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1551706', 'n_tokens_mistral': 2558, 'n_tokens_neox': 2437, 'n_words': 452}