roblanf / sangeranalyseR

functions to analyse sanger sequencing reads in R
MIT License
95 stars 24 forks source link

writeFasta: `outputDir=NULL` write to temp directory #86

Open nick-youngblut opened 1 year ago

nick-youngblut commented 1 year ago

reprex:

my_aligned_contigs <- SangerContig(ABIF_Directory      = "my_data/",
                                   processMethod       = "CSV",
                                   contigName          = " my_contig",
                                   CSV_NamesConversion = "path/to/table.csv")
writeFasta(my_aligned_contigs)

The output:

INFO [2023-01-16 21:57:59] Your input is 'SangerContig' S4 instance
INFO [2023-01-16 21:57:59] >>> outputDir : /tmp/RtmpZrqBmS
INFO [2023-01-16 21:57:59] Start to write 'XXX' to FASTA format ...
INFO [2023-01-16 21:57:59] >> Writing alignment to FASTA ...
INFO [2023-01-16 21:57:59] >> Writing all single reads to FASTA ...
INFO [2023-01-16 21:57:59] >> Writing consensus read to FASTA ...
INFO [2023-01-16 21:57:59] Finish writing 'XXX' to FASTA format

Why write to /tmp/ by default? Is the user expected to access the files from /tmp/ (not easy to get to via the mac Finder)? Why not default to the working directory?