DNAnalyzer icon indicating copy to clipboard operation
DNAnalyzer copied to clipboard

Issue #215 provide dna files in compressed format to allow faster clo…

Open MartinGallauner opened this issue 3 years ago • 17 comments

Closes #215.

  • removed existing files
  • added compressed file dna.zip
  • added note to README.md

MartinGallauner avatar Oct 23 '22 12:10 MartinGallauner

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 23 '22 12:10 CLAassistant

You don't actually need 7zip to uncompress .zip files, programs like WinRar will also work and you can also use Window's Built-in uncompression program. Are you also able to include a CLI Command for 7Zip on how to uncompress that file without going into file explorer?

LimesKey avatar Oct 23 '22 13:10 LimesKey

Good, I will remove the 7-zip entry because of that reason. I thought this would work independently of the user's OS.

And I will add the CLI command

MartinGallauner avatar Oct 23 '22 13:10 MartinGallauner

In the future, we could create a setup command so that when the setup program is run, it will also uncompress all large files.

LimesKey avatar Oct 23 '22 13:10 LimesKey

My last commit changed the compressed file format from .7z to .zip. The fact that every OS can handle .zip is a good argument @LimesKey !

MartinGallauner avatar Oct 23 '22 14:10 MartinGallauner

'unzip' is not recognized as an internal or external command,
operable program or batch file.

You might want to just create a batch file script to do this for you to make this as easy as possible, something like this.

setlocal
cd /d %~dp0
Call :UnZipFile "C:\Temp\" "c:\FolderName\batch.zip"
exit /b

:UnZipFile <ExtractTo> <newzipfile>
set vbs="%temp%\_.vbs"
if exist %vbs% del /f /q %vbs%
>%vbs%  echo Set fso = CreateObject("Scripting.FileSystemObject")
>>%vbs% echo If NOT fso.FolderExists(%1) Then
>>%vbs% echo fso.CreateFolder(%1)
>>%vbs% echo End If
>>%vbs% echo set objShell = CreateObject("Shell.Application")
>>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
>>%vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip)
>>%vbs% echo Set fso = Nothing
>>%vbs% echo Set objShell = Nothing
cscript //nologo %vbs%
if exist %vbs% del /f /q %vbs%

https://superuser.com/questions/1314420/how-to-unzip-a-file-using-the-cmd

LimesKey avatar Oct 23 '22 14:10 LimesKey

@LimesKey the unzip command only works on Linux/Unix. For Windows, you would run the following command in PowerShell:

Expand-Archive -LiteralPath assets/dna.zip  -DestinationPath assets && rm assets/dna.zip

It would still be great if the script could somehow be implemented.

VerisimilitudeX avatar Oct 24 '22 00:10 VerisimilitudeX

@LimesKey the unzip command only works on Linux/Unix. For Windows, you would run the following command in PowerShell:

Expand-Archive -LiteralPath assets/dna.zip  -DestinationPath assets && rm assets/dna.zip

It would still be great if the script could somehow be implemented.

Windows users don't use PowerShell, they often use Command Prompt, a batch file might work, create a setup.bat to uncompress files and automatically open up a terminal already CDed to the program. Maybe I add this in a new feature #249.

LimesKey avatar Oct 24 '22 07:10 LimesKey

👍👍

VerisimilitudeX avatar Oct 24 '22 14:10 VerisimilitudeX

Alright, I'm going to merge this then once @MartinGallauner makes the changes requested. Thanks for working on this, I really appreciate it!

VerisimilitudeX avatar Oct 24 '22 16:10 VerisimilitudeX

Alright, I'm going to merge this then once @MartinGallauner makes the changes requested. Thanks for working on this, I really appreciate it!

Alright, I will do this in the next few days.

Thanks for all your feedback.!

MartinGallauner avatar Oct 25 '22 14:10 MartinGallauner

Sounds good @MartinGallauner! If you need this issue approved quickly for Hacktoberfest, let me know. By the way, would you be interested in joining our Discord server? https://github.com/Verisimilitude11/DNAnalyzer/discussions/256

VerisimilitudeX avatar Oct 25 '22 16:10 VerisimilitudeX

Looks like Expand-Archive -LiteralPath assets/dna.zip -DestinationPath assets ; rm assets/dna.zip only works

I get this with the &&, The token '&&' is not a valid statement separator in this version. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : InvalidEndOfLine

LimesKey avatar Oct 27 '22 18:10 LimesKey

@LimesKey are you running it in PowerShell? Regardless, I agree that implementing a batch file would be easier - the program can run it when it first starts. I'll open a separate issue for that and will work on it myself.

VerisimilitudeX avatar Oct 27 '22 19:10 VerisimilitudeX

@Verisimilitude11 I am running it in powershell, it only works with the ';'.I also created a feature request issue for the batch file.

LimesKey avatar Oct 27 '22 19:10 LimesKey

@Verisimilitude11 Do you think we can merge this?

MartinGallauner avatar Oct 30 '22 16:10 MartinGallauner

@Verisimilitude11 Do you think we can merge this?

Yes, I apologize, @MartinGallauner, I've had a lot of things in my backlog and didn't have time to review this. I'll get it merged today.

VerisimilitudeX avatar Oct 30 '22 19:10 VerisimilitudeX

I don't think this fully closes #215, but I think it's a great stepping stone to get there. I've been working on making a new binary format for FASTA, which I think would fully close the Issue. LGTM!

ImpossibleReality avatar Oct 31 '22 16:10 ImpossibleReality

This pull may not be merged as #289 fully resolves the issue, this is more of a quick-temp fix. If #289 gets merged, the zipped compression won't be very useful and I believe #289 may also incorporate some type of compression directly in the file format (.fab).

LimesKey avatar Nov 02 '22 05:11 LimesKey

Sounds like the smarter solution! Let me know when I should like this PR

MartinGallauner avatar Nov 02 '22 06:11 MartinGallauner

@MartinGallauner we'll still need your help for organizing the files after #289 is completed. Thanks for working on this feature! I'll still leave this PR open as it contains a lot of information that may be useful later down the road.

VerisimilitudeX avatar Nov 02 '22 15:11 VerisimilitudeX

Stale pull request message

github-actions[bot] avatar Jan 01 '23 18:01 github-actions[bot]