-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub changes to support multiple distances for clustering
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Get a distance matrix from a H3N2 HA alignment. | ||
|
||
$ pathogen-distance \ | ||
> --alignment $TESTDIR/data/h3n2_ha_alignment.sorted.fasta \ | ||
> --output ha_distances.csv | ||
|
||
Get a distance matrix from a H3N2 NA alignment. | ||
|
||
$ pathogen-distance \ | ||
> --alignment $TESTDIR/data/h3n2_na_alignment.sorted.fasta \ | ||
> --output na_distances.csv | ||
|
||
Find clusters from the genetic distances for both HA and NA. | ||
|
||
$ pathogen-cluster \ | ||
> --distance-matrix ha_distances.csv na_distances.csv \ | ||
> --label-attribute genetic_label \ | ||
> --distance-threshold 0.5 \ | ||
> --output-dataframe cluster_distances.csv | ||
|
||
There should be one record in the cluster output for each record in the input distances. | ||
|
||
$ [[ $(wc -l < cluster_distances.csv) == $(wc -l < ha_distances.csv) ]] | ||
|
||
The header should include the index strain, each strain from the distance matrix, and the requested cluster label. | ||
|
||
$ head -n 1 cluster_distances.csv | ||
strain,.*,genetic_label (re) |