Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新至1.3.4版本 #18

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added DC_OCEAN-1.3.4-py3-none-any.whl
Binary file not shown.
14 changes: 9 additions & 5 deletions DC_OCEAN/Duplicate_Checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def InitEnvironment(self, InputDir, OutputDir):
raise Exception("Invalid Profile_Summary_Score_list!")

'''
This program is used to determine whether the potential duplicate pairs quickly identified in the N02 step are actually duplicated, and if so, output
This program is used to determine whether the possible duplicates quickly identified in the N01 step are actually duplicated, and if so, output
input data: the txt file output from the ./support/N01_Possible_Duplicate_Check.py
output: two txt files: the duplicated list and the non-duplicated list. These two files can be opened by using Excel etc.
'''
Expand Down Expand Up @@ -129,17 +129,16 @@ def duplicate_checke_manual(self, netCDF_filepath):
print('Duplicate result is: Not Duplicate')

"""
This program is used to determine whether the potential duplicate pairs quickly identified in the N01 step are actually duplicated, and if so, output
This program is used to determine whether the possible duplicates quickly identified in the N01 step are actually duplicated, and if so, output
input data: the txt file output from the ./support/N01_Possible_Duplicate_Check.py
output: two txt files: the duplicated list and the non-duplicated list. These two files can be opened by using Excel etc.
"""
# mode = 0: DuplicateCheckeList
def duplicate_checke_multiple(self,netCDF_filepath,potential_txt_path):

### Read potential_files_txt
### Read possible_files_txt
potential_files_list=self.read_potential_txt(potential_txt_path)


# script_directory = os.path.dirname(potential_txt_path)
script_directory, _filename = os.path.split(potential_txt_path)

Expand Down Expand Up @@ -191,7 +190,12 @@ def duplicate_checke_multiple(self,netCDF_filepath,potential_txt_path):
continue

### Compare the data
isDuplicated,duplicate_multimodels=compair_main.compair(content1,content2)
isDuplicated, duplicate_multimodels = compair_main.compair(content1, content2)
# try:
# isDuplicated,duplicate_multimodels=compair_main.compair(content1,content2)
# except:
# print(filepath1)
# print(filepath2)

### Output nonduplicated profile pair information
if (isDuplicated == False):
Expand Down
50 changes: 5 additions & 45 deletions DC_OCEAN/Input_files/DuplicateList_sorted_unique_pairs_generic.txt

Large diffs are not rendered by default.

Binary file modified DC_OCEAN/Input_files/Profile_Summary_Score_list.npz
Binary file not shown.
237 changes: 24 additions & 213 deletions DC_OCEAN/Input_files/Unduplicatelist_sorted_unique_pairs_generic.txt

Large diffs are not rendered by default.

287 changes: 29 additions & 258 deletions DC_OCEAN/Input_files/sorted_unique_pairs_generic.txt

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions DC_OCEAN/M00_Duplicate_Check_MAIN.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
### Date | Author | Version | Description
### ------------|-------------------|---------------|---------------
### 2024-03-26 | | 1.1 | Create
### 2024-06-01 | | 1.2 | Modify
### 2024-07-04 | | 1.3 | Modify
### 2024-06-01 | | 1.2 | Modified
### 2024-07-04 | | 1.3 | Modified
######################################################################

"""
Expand Down Expand Up @@ -44,13 +44,17 @@

# Manually check whether the potential duplicates are exact duplicates based on some criterias one by one pair.
def DuplicateCheckeManual(checker, InputDir, OutputDir):
if not os.path.isdir(OutputDir):
os.mkdir(OutputDir)
if checker.validate_file(InputDir):
checker.duplicate_checke_manual(InputDir)
else:
print("The entered path of netCDF files is not valid. Please ensure the path is correct and try again.")

# Automatically check whether the potential duplicates list are exact duplicates based on some criterias.
def DuplicateCheckeList(checker, InputDir, OutputDir):
if not os.path.isdir(OutputDir):
os.mkdir(OutputDir)
# input the path with filename (*.txt) of the potential duplicated list output from N01_possible_duplicates.py
potential_txt_path = OutputDir + "/sorted_unique_pairs_generic.txt"
if checker.validate_file(potential_txt_path):
Expand Down Expand Up @@ -83,6 +87,8 @@ def DuplicateCheckeList(checker, InputDir, OutputDir):
#initialization the code environment (class)
oChecker = Duplicate_Checker.DuplicateChecker()
oChecker.InitEnvironment(InputDir, OutputDir)



if(iMode == 0):
#mode = 0: DuplicateCheckeList
Expand Down
Loading