Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lilypeck authored Sep 25, 2024
1 parent 59c6c70 commit db06334
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Fig3_findHTRs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ bedtools makewindows -w ${window} -g ${referencegenome3}.bed > ${referencegenome
## output is tsv file with mean % similarity in 10kb windows and 2.5kb slide
## this is because it takes the mean of 7th col of cov.tsv (which is % similarity)

ls *.fna | while read comparison; do comparisonstrain=$( echo $comparison | awk -F "/" '{print $NF}' | awk -F "." '{print $1.$2}' ); minimap2 -c --secondary=no --cs ${referencegenome} ${comparison} | sort -k6,6 -k8,8n > ${comparisonstrain}.minimap2_${referencestrain}.paf; paftools.js splice2bed ${comparisonstrain}.minimap2_${referencestrain}.paf > ${comparisonstrain}.minimap2_${referencestrain}.bed; bedtools makewindows -w 100 -s 100 -g ${referencegenome3}.bed > ${referencegenome3}.short.bed; bedtools coverage -a ${referencegenome3}.short.bed -b ${comparisonstrain}.minimap2_${referencestrain}.bed > ${comparisonstrain}.minimap2_${referencestrain}.cov.tsv; bedtools map -b ${comparisonstrain}.minimap2_${referencestrain}.cov.tsv -a ${referencegenome3}.${window2}kbwindow_${slide2}kbslide.bed -c 7 -o mean > ${comparisonstrain}.minimap2_${referencestrain}.cov.binned.tsv; done
ls *.fna | while read comparison; do comparisonstrain=$( echo $comparison | awk -F "/" '{print $NF}' | awk -F "." '{print $1.$2}' ); minimap2 -cx asm10 --secondary=no --cs ${referencegenome} ${comparison} | sort -k6,6 -k8,8n > ${comparisonstrain}.minimap2_${referencestrain}.paf; paftools.js splice2bed ${comparisonstrain}.minimap2_${referencestrain}.paf > ${comparisonstrain}.minimap2_${referencestrain}.bed; bedtools makewindows -w 100 -s 100 -g ${referencegenome3}.bed > ${referencegenome3}.short.bed; bedtools coverage -a ${referencegenome3}.short.bed -b ${comparisonstrain}.minimap2_${referencestrain}.bed > ${comparisonstrain}.minimap2_${referencestrain}.cov.tsv; bedtools map -b ${comparisonstrain}.minimap2_${referencestrain}.cov.tsv -a ${referencegenome3}.${window2}kbwindow_${slide2}kbslide.bed -c 7 -o mean > ${comparisonstrain}.minimap2_${referencestrain}.cov.binned.tsv; done
2 changes: 1 addition & 1 deletion Fig6_S11.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ library(aplot)
```

```{r read in files and format them}
### first run Fig6_findTEs.sh to identify TEs in genomes
species.tree <- read.tree("./Data/Speciestree.treefile")
mimps<-read.csv("./Data/mimps.csv", sep=",",header = 1)
groups<-read.table("./Data/species.tree.tip.labelgroup.txt", sep="\t",header = 1)
Expand Down
38 changes: 38 additions & 0 deletions Fig6_findTEs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
##### first build the database then run repeatmodeler
#PBS -l walltime=48:00:00
#PBS -l select=1:ncpus=64:mem=244gb

cd $PBS_O_WORKDIR

module load anaconda3/personal
source activate repeatmodeler

singularity exec \
--bind $PWD:$PWD \
dfam-tetools-latest.sif BuildDatabase -name "ragtag.assemblies" -dir ragtag.assemblies

singularity exec \
--bind $PWD:$PWD \
dfam-tetools-latest.sif RepeatModeler \
-database ragtag.assemblies \
-pa 32 -LTRStruct


##### then run repeatmasker using customised TE library
#PBS -l walltime=24:00:00
#PBS -l select=1:ncpus=64:mem=124gb

cd $PBS_O_WORKDIR

module load anaconda3/personal
source activate repeatmodeler

singularity exec \
--bind $PWD:$PWD \
dfam-tetools-latest.sif \
RepeatMasker -lib ragtag.assemblies-families.manual.mimps.schmidt.fa \
-pa 32 -s \
-dir RM_out \
-alignments \
-gff -no_is \
ragtag.assemblies/*.fasta

0 comments on commit db06334

Please sign in to comment.