generated from OpenOmics/baseline
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ppqt routing and acceptance of tagalign
- Loading branch information
Showing
8 changed files
with
84 additions
and
46 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
#!/usr/bin/env python3 | ||
|
||
#Purpose: To grab the estimated fragment length from the ppqt output and a small txt with that information. For input files, adding an extra value of 200bp as an alternative. | ||
# Purpose: | ||
# To grab the estimated fragment length from the ppqt output and a | ||
# small txt with that information. For input files, adding an extra | ||
# value of 200bp as an alternative. | ||
import argparse | ||
parser = argparse.ArgumentParser(description='Script to extract the the estimated fragment length from the ppqt output.') | ||
parser.add_argument('-i', required=True,help='Name of the ppqt txt file') | ||
parser.add_argument('-o', required=True,help='Name of the output file') | ||
args = parser.parse_args() | ||
|
||
output = args.o | ||
inppqt = args.i | ||
|
||
o=open(output,'w') | ||
def main(args): | ||
cln_file = lambda z: z.strip().split() | ||
this_file = list(map(cln_file, open(args.ppqt, "r").readlines())) | ||
ppqt_values = this_file[0][2].split(",") | ||
frag_len = None | ||
for ppqt_value in ppqt_values: | ||
if int(ppqt_value) > 150: | ||
frag_len = ppqt_value | ||
break | ||
|
||
file = list(map(lambda z:z.strip().split(),open(inppqt,'r').readlines())) | ||
if frag_len is None: | ||
frag_len = 200 | ||
print(frag_len) | ||
return | ||
|
||
|
||
ppqt_values = file[0][2].split(",") | ||
extenders = [] | ||
for ppqt_value in ppqt_values: | ||
if int(ppqt_value) > 150: | ||
extenders.append(ppqt_value) | ||
if len(extenders) > 0: | ||
o.write(extenders[0]) | ||
else: | ||
o.write("200") | ||
o.close() | ||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description="Script to extract the the estimated fragment length from the ppqt output." | ||
) | ||
parser.add_argument("ppqt", help="Name of the ppqt txt file") | ||
args = parser.parse_args() | ||
main(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters