Skip to content

Commit

Permalink
file name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
katiesevans committed Feb 10, 2022
1 parent 28d5725 commit 19b1159
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
7 changes: 4 additions & 3 deletions bin/process_ibd_nf_final.R
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ ggplot(plot_df,
facet_grid(.~chromosome, scales="free", space="free") +
theme(legend.position="none")

ggsave("haplotype.pdf", height = 48, width = 24)
ggsave("haplotype3.pdf", height = 70, width = 35, limitsize = FALSE)
# might need to make longer with more strains...
ggsave("haplotype.pdf", height = 70, width = 35, limitsize = FALSE)
ggsave("haplotype.png", height = 70, width = 35, limitsize = FALSE)



Expand Down Expand Up @@ -332,7 +333,7 @@ ggplot(plot_df,
facet_grid(.~chromosome, scales="free", space="free") +
theme(legend.position="none")

ggsave(paste("max_haplotype_genome_wide.pdf"),
ggsave(paste("sweep.pdf"),
height = 70, width = 35, limitsize = FALSE)

#===============#
Expand Down
9 changes: 7 additions & 2 deletions bin/reoptimzied_divergent_region_characterization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,13 @@ write.csv(df_divergent_final_isotype, file="DataS3_divergent_regions_isotypes.cs
div_bed <- df_divergent_final_isotype %>%
dplyr::select(CHROM, cluster_start, cluster_end, STRAIN) %>%
dplyr::arrange(CHROM, cluster_start)
dplyr::arrange(CHROM, cluster_start) %>%
dplyr::mutate(cluster_start = as.numeric(cluster_start),
cluster_end = as.numeric(cluster_end))
write.table(div_bed, "divergent_regions_strain.bed", quote=F, col.names = F, row.names=F, sep="\t")
# write.table(div_bed, "divergent_regions_strain.bed", quote=F, col.names = F, row.names=F, sep="\t")
# see if this avoids the errors with 1.4e+07...
readr::write_tsv(div_bed, "divergent_regions_strain.bed", col_names = F)
## total size
Expand Down Expand Up @@ -374,6 +378,7 @@ df_div_all <- df_divergent_final %>%
dplyr::arrange(., chr, start)
readr::write_tsv(df_div_all, "All_divergent_regions.tsv")
readr::write_tsv(df_div_all, "divergent_regions_all.bed")
## clustered
Expand Down
7 changes: 6 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ process define_divergent_region {
file("*")

output:
tuple file("divergent_regions_strain.bed"), file("divergent_regions.png")
tuple file("divergent_regions_strain.bed.gz"), file("divergent_regions_all.bed.gz"), file("divergent_regions.png")

"""
cp ${workflow.projectDir}/bin/reoptimzied_divergent_region_characterization.Rmd reoptimzied_divergent_region_characterization.Rmd
Expand All @@ -562,6 +562,11 @@ process define_divergent_region {
cp ${params.bin_bed} ./divergent_bins.bed
cp divergent_regions_strain.bed ./divergent_df_isotype.bed
# gzip divergent files
gzip divergent_regions_strain.bed
cp All_divergent_regions.tsv divergent_regions_all.bed
gzip divergent_regions_all.bed
"""
}

Expand Down

0 comments on commit 19b1159

Please sign in to comment.