Skip to content

Commit

Permalink
Detect event return a tuple, use event[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykironde committed Apr 22, 2024
1 parent 331f55f commit ec33518
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def flights_in_year_site(wildcards):
flight_path = os.path.join(basepath, year, site, f"{flight}_projected.shp")
# Assuming there is a tools.get_event function
event = tools.get_event(flight_path)
if site == wildcards.site and year == wildcards.year and event == "primary":
if site == wildcards.site and year == wildcards.year and event[0] == "primary":
flights_in_year_site.append(flight_path)
return flights_in_year_site

Expand Down
6 changes: 3 additions & 3 deletions everglades_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=everglades_workflow
#SBATCH [email protected]
#SBATCH --mail-type=FAIL
#SBATCH --gpus=a100:1
#SBATCH --cpus-per-task=30
#SBATCH --gpus=a100:4
#SBATCH --cpus-per-task=60
#SBATCH --mem=1200gb
#SBATCH --time=80:00:00
#SBATCH --partition=gpu
Expand All @@ -22,5 +22,5 @@ cd /blue/ewhite/everglades/EvergladesTools/Zooniverse

snakemake --unlock
echo "INFO [$(date "+%Y-%m-%d %H:%M:%S")] Starting Snakemake pipeline"
snakemake --printshellcmds --keep-going --cores 30 --resources gpu=1 --rerun-incomplete --latency-wait 10 --use-conda
snakemake --printshellcmds --keep-going --cores 60 --resources gpu=4 --rerun-incomplete --latency-wait 10 --use-conda
echo "INFO [$(date "+%Y-%m-%d %H:%M:%S")] End"
1 change: 0 additions & 1 deletion tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def get_event(path):
return ("primary", "")



def get_site(path):
path = os.path.basename(path)
regex = re.compile("(\\w+)_\\d+_\\d+_\\d+.*_projected")
Expand Down

0 comments on commit ec33518

Please sign in to comment.