-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfasta_check.sh
More file actions
executable file
·39 lines (35 loc) · 1.22 KB
/
fasta_check.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.22 KB
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
#!/bin/bash -l
#SBATCH -D /home/dmvelasc/Projects/Prunus/Analysis/selection
#SBATCH -o /home/dmvelasc/Projects/Prunus/slurm-log/%j-facheck-stdout.txt
#SBATCH -e /home/dmvelasc/Projects/Prunus/slurm-log/%j-facheck-stderr.txt
#SBATCH -J facheck
#SBATCH -t 8-00:00:00
#SBATCH -n 1
#SBATCH -c 1
#SBATCH -p bigmemm
#SBATCH --mail-user=dmvelasco@ucdavis.edu
#SBATCH --mail-type=ALL
set -e
set -u
# number of genes = number of arrays = 27864
# --exclude=bigmem1,bigmem2
### Declare directories ###
ref="/home/dmvelasc/Data/references/persica-SCF" # reference directory
gene_list="${ref}/Prunus_persica_v1.0_genes_list.gff3" # gene list
FASTAdir="/group/jrigrp3/Velasco/Prunus/fasta/fasta-nostop" # final fasta directory
for i in {0..27863}; do
#### sample ID file
mapfile -s "$i" -n 1 -t gene < "${gene_list}"
# declare gene ID variable from array
gene_id="${gene[0]}"
##### B U S T E D #####
if [ ! -f "${FASTAdir}/${gene_id}_cds_aln_nostop.fasta" ]; then
# if file exists and is not empty
echo "${i}: ${gene_id}_cds_aln_nostop.fasta does not exist"
# if [ -s "${FASTAdir}/${gene_id}_cds_aln_nostop.fasta" ]; then
# echo "and is not an empty file."
# else
# echo "but is an empty file."
# fi
fi
done