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

Ac tables2table #130

Merged
merged 5 commits into from
Oct 25, 2024
Merged
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
23 changes: 14 additions & 9 deletions cgat/tools/tables2table.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,20 @@ def main(argv=sys.argv):

E.info("combining %i tables" % len(args.filenames))

if args.cat:
table = concatenate_tables(args.filenames,
regex_filename=args.regex_filename,
separator=args.separator,
headers=args.headers,
missing_value=args.missing_value,
cat=args.cat)

table.to_csv(args.stdout, sep=args.separator, index=False)
# Remove the if statement and call concatenate_tables directly
table = concatenate_tables(args.filenames,
regex_filename=args.regex_filename,
separator=args.separator,
headers=args.headers,
missing_value=args.missing_value,
cat=args.cat)

# Ensure the table object is not None before attempting to write it
if table is not None:
table.to_csv(args.stdout, sep=args.separator, index=False)
else:
E.warn("No tables were concatenated.")

E.stop()


Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cgat-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
- pep8
- pybedtools
- pybigwig
- pysam>=0.18.0
- pysam
- pyyaml
- quicksect
- rdflib
Expand Down
Loading