-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStructre_threader_run.txt
44 lines (29 loc) · 1.72 KB
/
Structre_threader_run.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
##Install Structure_Threader
https://structure-threader.readthedocs.io/en/latest/install/
module load Python/3.8.6-GCCcore-10.2.0
you can type python3 --version from a terminal to see if python 3 is installed
pip3 install structure_threader --user
#Running the command from step 1 will install the program to ~/.local/bin. You can either run it by calling it directly ~/.local/bin/structure_threader
# Also note that on GNU/Linux installing Structure_threader will also automatically install binaries for STRUCTURE, fastStructure and MavericK, which will also be placed under ~/.local/bin.
#Sometime the structure file wont run on the computational cluster due to formatting errors at the end fo the file. It is reccomended to try this to convert to unixfile and it usually works.
perl -p -e 's/\r$//' < NAMESTRUCTUREFILE.str > unixfile.txt
or
awk '{ sub("\r$", ""); print }' NAMESTRUCTUREFILE.str > unixfile.txt
#Check file and then number of columns i.e number of SNPS that goes into mainparams file
awk -F'\t' '{print NF}' filenamehere | sort -nu | tail -n 1
#edit mainparams file to ensure locations is 0 for no populations and number of snps/loci is correct.
#Run Structure Threader bash script
#!/bin/bash
#SBATCH --job-name=structure
#SBATCH --time=24:00:00
#SBATCH --mem=32G
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --output=outputstr.%j
#### SLURM 1 processor test to run for 24hours
module load Perl
module load Python/3.8.6-GCCcore-10.2.0
#run structure threader
structure_threader run -K 10 -R 10 -i Structureinputfile -o ./structureoutputfile -t 20 -st ./Software/structure/structure
###############################Output#############
# You will have a folder with the output k files, and folders for best K and Plots.