Actel requires that you organise your input files in a specific fashion. Critically, you should have a file named biometrics.csv, one named spatial.csv, and one named deployments.csv (we will look into the file contents in detail soon). Finally, you also need a detections directory, containing all your detection files in .csv format.
To create a blank workspace ready to be used, run
createWorkspace(), and a template will be generated automatically in an “actel_workspace” directory. If you would like to, you can change the name of the target directory by using the argument
dir. Remember to delete the example rows before including your data!
Your biometrics file should look similar to this:
|2018-02-01 10:05:00||12340001||1||150||40||Wild||Site A||…|
|2018-02-01 10:10:00||A12-3456-1001||1001||160||60||Hatchery||Site A||…|
|2018-02-01 10:15:00||19340301||301||170||50||Wild||Site B||…|
Although the column order is not important, it is essential that this table contains two columns:
The Group and Release.site columns are also important but, if you only have one group or one release site, actel can generate these columns for you. If this happens, you will receive a message:
M: No Release site has been indicated in the biometrics file. Creating a 'Release.site' column to avoid script failure. Filling with 'unspecified'. M: No 'Group' column found in the biometrics file. Assigning all animals to group 'All'.
Your spatial file should look similar to this:
In this file you should include both your station deployment sites and your release sites. It is essential that this table has the following columns:
The release sites must have exactly the same names in the biometrics table and in the spatial table. If there is a mismatch, actel will stop so you may correct this.
If the spatial table contains release site information, but the biometrics table does not, release site information will be discarded and the following warning is issued:
Warning: At least one release site has been indicated in the spatial file, but no release sites were specified in the biometrics file. Discarding release site information to avoid script failure. Please doublecheck your data.
Click here to learn more about how to fit your study area into a spatial.csv file.
The deployments file is where you will list the receivers you used in the study. here is an example:
|11111||River East||2018-01-01 11:30:00||2018-05-03 09:30:00|
|22222||River West||2018-01-01 11:33:00||2018-05-04 08:33:00|
|33333||Estuary||2018-01-01 11:34:00||2018-05-05 12:00:00|
Short description of the columns:
Including your detections is the easiest part. Copy the .csv files offloaded from your receivers to the detections folder that was created by the createWorkspace() function and actel will know they are to be imported. Right now actel can upload files generated specifically for actel, or generated by VEMCO and THELMA manufactured receivers. If you have an receiver from a different manufacturer, or if you are using one of the supported manufacturers and get the warning displayed below, please to contact me so we can solve the issue.
Warning: File 'filename' does not match to any of the supported hydrophone file formats! If your file corresponds to a hydrophone log and actel did not recognize it, please get in contact through www.github.com/hugomflavio/actel/issues/new
If you are working with a large database, odds are your detection data is no longer in the format of any given manufacturer. To import this data into actel, please prepare a .csv file with the following format:
A distances matrix is a table that contains information on the distance (in metres) between every pair of spatial elements in your study area (i.e. your stations and your release sites). It looks like the table below:
You can learn more about creating distances matrices in this page.
If your study area has multiple branches, then you need to tell actel how your arrays connect with each other. This file is optional because, if omitted, actel will assume that your study area is composed by a single branch and that the array order is the one listed in the spatial.csv file.
The spatial.txt file is very simple; all you need to do is connect your arrays with either dashes or arrows (find out the difference below). You can connect your arrays in pairs or make longer strings. To decide whether or not two arrays should be connected, ask yourself the following: “Can the animals move from A to B without having to pass through any other array?” If the answer is yes, then the arrays should be connected. Let’s have a look at some examples:
This is the simplest case, e.g. your animals are migrating through a channel, and your arrays split this channel in sections. Like in the figure below:
For this specific case you do not need to include a spatial.txt file, as long as you order the arrays in the spatial.csv file. However, if you wanted to include a spatial.txt file, it would look like this:
A -- B -- C -- D -- E
Note that you could also specify only one connection per line. E.g.:
A -- B B -- C C -- D D -- E
This case is similar to above, but some arrays do not cover the totality. For example, they may cover a specific area of a lake (e.g. a spawning ground), Like in the figure below:
In this case, the animals can move from B to D without passing through C. As such, a spatial.txt file is now required, and it would look like this:
A -- B -- D -- E B -- C C -- D
Note that now, B, C and D are all directly connected with each other.
In this case, the water channel branches into multiple paths, which may then merge again or not, like in the figure below:
Things are getting a bit more complex now. To make sure you do not miss any connection, it can be useful to draw in a map the links between the arrays as you write them down, so you can check at the end if everything is done. Below, I have marked in purple the connections between all the arrays:
And here is the respective spatial.txt:
A -- B A -- E A -- F B -- E B -- F E -- F B -- C C -- D C -- E E -- D F -- G
Or, in the shortened version:
A -- B -- C -- D A -- E -- D A -- F -- G B -- E -- F B -- F C -- E
If are feeling wary of including multiple links in a single line, you can use the function
readDot to read your spatial.txt file before starting the analysis and see if everything checks out. E.g.:
readDot(input = "spatial.txt")
In the migration analysis, array direction is relevant. That means that writing
A -- B is not the same as writing
B -- A. In the first case, array B comes after array A (i.e. the animals are expected to reach A before reaching B), while in the second case the situation is reversed. This has implications for array efficiency calculations, so be sure to encode your study area carefully.
If you intend to run an explore or residency analysis, array direction is irrelevant.
An optimal spatial.txt may differ depending on whether you want to run a migration or an explore/residency analysis. This is because actel interprets the spatial.txt file differently depending on the analysis:
In an explore/residency analyses,
A -- B should be read as:
It is possible to move from array A to array B and vice-versa
In a migration analysis,
A -- B should be read as:
It is possible to move from array A to array B and vice-versa, AND the animals are expected to pass through array A before reaching array B
Let’s have a look at this example.
In this case, the spatial.txt for a residency analysis would look like this:
A -- B -- C -- G A -- D -- E -- G D -- F -- G D -- B C -- E C -- F E -- F
But a spatial.txt for a migration analysis would look like this:
A -- B -- C -- G A -- D -- E -- G D -- F -- G D -- B -- D C -- E -- C C -- F -- C E -- F -- E
The difference here is that, in the spatial.txt for migration, actel expects arrays to connected in a directional way. That means that connecting
D -- B and
B -- D does not mean the same thing, and it is important that you explicitly state that the animals are as likely to reach B coming from D as they are to reach D coming from B. In other words, you are saying that neither of the movements would be an explicit backwards movement. This will inform actel that D and B are parallel arrays, and that special rules should apply to them. The same goes for C, E and F.
Sometimes it is possible for your animals to go from A to B, but not from B to A. In actel, you can include this information to further refine the analysis. In total, there are three symbols you can use to connect your arrays:
If the animals can move from A to B and vice-versa, use
A -- B.
If the animals can only move from A to B, use either
A -> B or
B <- A.
If an animal then actually moves from B to A, actel will try to find an alternative route that the animal could have taken. If there are no alternative routes from B to A, actel will call this situation to your attention.
This has implications for array efficiency calculations, so be sure to encode your study area carefully.
You can find more information about impassable barriers here.
Now that you have prepared your workspace, it is time to start the analysis. The first thing you need to do is decide which analysis you want to run:
residency(). Here is some more information on them:
explore() allows you to quickly get a summary of your data. You can use explore() to get a general feel for the study results, and check if the input files are behaving as expected. It is also a good candidate if you just want to validate your detections for later use in other analyses.
Learn more about the explore function.
The migration() analysis runs the same initial checks as explore(), but on top of it, it analyses the animal behaviour. By selecting the arrays that lead to success, you can define whether or not your animals survived the migration. Additional plots help you find out if some animal/tag has been acting odd. Multiple options allow you to tweak the analysis to fit your study perfectly.
Learn more about the migration function.
The residency() analysis runs the same initial checks as explore(), but, similarly to migration, explores particular points of the animal behaviour. If you want to know where your animals were in each day of the study, how many animals were in each section each day, and other residency-focused variables, this is the analysis you are looking for!
Learn more about the residency function.