This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
2018pipeline [2018/09/11 15:32] david [Pipeline script] |
2018pipeline [2018/09/11 15:44] david [Pipeline script] |
||
---|---|---|---|
Line 471: | Line 471: | ||
# pipeline.sbatch - Perform grep on a GFF file, then run faFrag to extract DNA for | # pipeline.sbatch - Perform grep on a GFF file, then run faFrag to extract DNA for | ||
# each line returned by grep. | # each line returned by grep. | ||
- | + | ||
+ | annotations=chr_wormbase.gff | ||
+ | |||
+ | if [ ! -e "$annotations" ] | ||
+ | then | ||
+ | echo "Need to supply an annotation file" >&2 | ||
+ | exit 1 | ||
+ | fi | ||
# Specify Gene list file | # Specify Gene list file | ||
Line 479: | Line 486: | ||
# Perform grep -f on Gene list file to get annotation lines from the GFF | # Perform grep -f on Gene list file to get annotation lines from the GFF | ||
- | grep -f $gene_lst chr_wormbase.gff | grep five_prime_utr > tmpfile.gff | + | grep -f $gene_lst $annotations | grep five_prime_utr > tmpfile.gff |
echo "temporary file contains $(wc -l tmpfile.gff) lines" | echo "temporary file contains $(wc -l tmpfile.gff) lines" | ||
# | # | ||
Line 508: | Line 515: | ||
out_fasta="$gene_id_trimmed.fa" | out_fasta="$gene_id_trimmed.fa" | ||
########### run the command! ############# | ########### run the command! ############# | ||
- | faFrag $in_fasta $chrom_start $chrom_end $out_fasta || echo ">>>>>>>>>>>>>>>>>>>>>>>>>>There was a problem with: '$line'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" | + | echo "Running faFrag on $gene_id_trimmed" |
+ | faFrag $in_fasta $chrom_start $chrom_end $out_fasta || echo ">>>>>>>>>>>There was a problem with: '$line'<<<<<<<<<<<<<<<" | ||
done < tmpfile.gff | done < tmpfile.gff |